1
0
mirror of synced 2025-01-18 22:41:43 +03:00
doctrine2/classes/Collection/Immediate.class.php
doctrine 571cb46726
2006-04-13 20:37:28 +00:00

29 lines
899 B
PHP

<?php
require_once(Doctrine::getPath().DIRECTORY_SEPARATOR."Collection.class.php");
/**
* @author Konsta Vesterinen
* @package Doctrine ORM
* @url www.phpdoctrine.com
* @license LGPL
* @version 1.0 alpha
*/
class Doctrine_Collection_Immediate extends Doctrine_Collection {
/**
* @param Doctrine_DQL_Parser $graph
* @param integer $key
*/
public function __construct(Doctrine_DQL_Parser $graph,$key) {
parent::__construct($graph->getTable($key));
$name = $this->table->getComponentName();
$data = $graph->getData($name);
if(is_array($data)) {
foreach($data as $k=>$v):
$this->table->setData($v);
$this->add($this->table->getRecord());
endforeach;
}
}
}
?>