示例#1
0
文件: Storage.php 项目: techart/tao
 public static function manager()
 {
     if (self::$manager) {
         return self::$manager;
     }
     return self::$manager = new Storage_Manager();
 }
示例#2
0
文件: Vars.php 项目: techart/tao
 public static function db()
 {
     switch (self::$type) {
         case 'orm':
             return WS::env()->orm->vars;
         case 'storage':
             return Storage::manager()->vars;
     }
 }
示例#3
0
文件: Storage.php 项目: techart/tao
 static function initialize()
 {
     $dirs = Storage::manager()->vars()->select(Storage::manager()->vars()->create_query()->eq('vartype', 'dir'));
     array_unshift($dirs, 'Нет');
     CMS_Vars_Storage_Entity::fields(array('vartype' => array('type' => 'select', 'caption' => 'Тип', 'items' => CMS::vars()->types()), 'parent_id' => array('type' => 'tree_select', 'caption' => 'Родитель', 'items' => $dirs), 'code' => array('caption' => 'Идентификатор', 'type' => 'varcode'), 'title' => array('type' => 'input', 'caption' => 'Комментарий', 'tagparms' => array('style' => 'width: 98%')), 'full' => array('type' => 'checkbox', 'caption' => 'Ограниченный доступ')));
 }
示例#4
0
文件: Table.php 项目: techart/tao
 protected function storage()
 {
     $name = $this->storage_name;
     return Storage::manager()->{$name}();
 }