示例#1
0
 function Fill(\DBAL\DataSource\SQLDataSource $dataSource)
 {
     $roots = $this->getRoots($dataSource);
     $dataSource->clear();
     if (count($roots) > 0) {
         foreach ($roots as $root) {
             $this->setCommand(\ORM\Query::build($this->getResource(), \ORM\Query::HYDRATE_NESTEDSET)->select()->from($this->getResource())->where('lft', $root->lft, '>=')->where('rgt', $root->rgt, '<='));
             parent::Fill($dataSource);
         }
     }
     return $dataSource->Data;
 }
示例#2
0
 function Fill(SqlDataSource $dataSource)
 {
     $this->Database = $dataSource->Database;
     return parent::Fill($dataSource);
 }