private function __construct() { $this->tablesManager = TablesManager::getInstance(); $this->fieldsManager = FieldsManager::getInstance(); $this->metaManager = MetaManager::getInstance(); $this->relationsManager = RelationsManager::getInstance(); $this->itemsManager = ItemsManager::getInstance(); $this->commentsManager = CommentsManager::getInstance(); $this->tablesMeta = []; }
/** * Функция обновляет список дополнительных полей в соответствии * с реальной структурой таблицы * @param $table имя таблицы */ public function updateFieldList($table) { $node = $this->load($table); if ($node->dry()) { return false; } $fields = FieldsManager::getInstance()->getFields($table); unset($this->tables[$table]); $node->af_fields = json_encode($fields); $node->save(); }