/** * Метод возвращает видимые пользователю объекты из базы */ 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); }
protected function init($mident, array $params) { $this->folding = FoldedStorageInsts::byUnique($params['unique']); $this->folding->assertWorkWithTable(); }
protected function init($mident, array $params) { $this->folding = Handlers::getInstance()->getFoldingByUnique($params['unique']); $this->folding->assertWorkWithTable(); }