Ejemplo n.º 1
0
 /**
  * Метод возвращает видимые пользователю объекты из базы
  */
 public function getVisibleObjects(FoldedResources $folded, $objName, array $visibleIdents)
 {
     $folded->assertWorkWithTable();
     $cacheKey = $folded->getUnique("visible-{$objName}");
     if (!$this->CACHE->has($cacheKey)) {
         $view = $folded->getTableView();
         $colIdent = $folded->getTableColumnIdent();
         $colStype = $folded->getTableColumnStype();
         $where = array();
         if ($colStype) {
             $where[$colStype] = $folded->getFoldingSubType();
         }
         $this->CACHE->set($cacheKey, $this->getArray(Query::select('*', $view, $where), null, ObjectQueryFetcher::inst($objName, $colIdent)->setIncludeKeys($visibleIdents)));
     }
     return $this->CACHE->get($cacheKey);
 }
Ejemplo n.º 2
0
 protected function init($mident, array $params)
 {
     $this->folding = FoldedStorageInsts::byUnique($params['unique']);
     $this->folding->assertWorkWithTable();
 }
Ejemplo n.º 3
0
 protected function init($mident, array $params)
 {
     $this->folding = Handlers::getInstance()->getFoldingByUnique($params['unique']);
     $this->folding->assertWorkWithTable();
 }