コード例 #1
0
 public function __construct($table_name, $class_name)
 {
     parent::__construct();
     $this->table_name = $table_name;
     $this->class_name = $class_name;
     return $this;
 }
コード例 #2
0
 function __construct($webpage = NULL)
 {
     parent::__construct();
     if (isset($webpage)) {
         $this->set_webpage($webpage);
     }
 }
コード例 #3
0
 public function __construct()
 {
     parent::__construct();
     $this->db = $this->CI->db;
     $this->CI->load->library("object/Puli_log");
     $this->puli_log = $this->CI->puli_log;
     $this->CI->load->library("object/bitstream");
 }
コード例 #4
0
ファイル: Context.php プロジェクト: 119155012/kals
 function __construct()
 {
     parent::__construct();
     $this->_CI_load('library', 'session', 'session');
     $this->session = $this->CI->session;
     $this->_CI_load('library', 'core/Logger', 'logger');
     $this->logger = $this->CI->logger;
     if (is_null(self::$CACHEABLE_TYPES)) {
         $this->CI->config->load('kals');
         self::$CACHEABLE_TYPES = $this->CI->config->item('CACHEABLE_TYPES');
     }
     $this->db->trans_start();
 }
コード例 #5
0
 /**
  * 建構子
  * @param mixed $obj 可以藉由在初始化時輸入參數,讓他成為預設成員
  * @return Collection
  */
 function __construct($obj = NULL)
 {
     parent::__construct();
     if (is_null($obj)) {
         return $this;
     }
     if (is_array($obj)) {
         $this->members = $obj;
     } else {
         if (isset($obj)) {
             $this->add_item($obj);
         }
     }
     return $this;
 }
コード例 #6
0
ファイル: Authorize_manager.php プロジェクト: 119155012/kals
 function Authorize_manager($resource = NULL, $actor = NULL)
 {
     parent::__construct();
     $this->_CI_load('library', 'policy/Policy', 'policy');
     $this->_CI_load('library', 'policy/Action_factory', 'action_factory');
     $this->action_factory = $this->CI->action_factory;
     if (is_object($resource)) {
         $this->set_resource($resource);
     }
     if (is_object($actor)) {
         $this->set_actor($actor);
     } else {
         $this->set_context_actor();
     }
     return $this;
 }
コード例 #7
0
 /**
  * 建構子
  * @param string|integer|array|null $table_name
  * 可以是資料表名稱(string)、ID(integer)、載入資料(array),或是給CodeIgniter讀取時不輸入任何參數使用。(null)
  * @param integer|string|null $id
  * 可以是ID(integer或是string),也可以是空值。
  * @return Generic_object
  */
 function __construct($table_name = NULL, $id = NULL)
 {
     parent::__construct();
     if ($this->use_cache) {
         if (is_array($table_name) && isset($table_name[$this->primary_key])) {
             $key = $this->primary_key;
             $value = $table_name[$this->primary_key];
             $go = get_cache($this, $key, $value);
             if (isset($go)) {
                 $this->_import($go);
                 $this->_post_construct($table_name, $id);
                 return $this;
             } else {
                 set_cache($this, $key, $value);
             }
         } else {
             if ((is_string($table_name) || is_int($table_name)) && is_null($id)) {
                 $cache_cond = $this->_get_cache_cond($table_name);
                 $go = get_cache($this, $cache_cond);
                 if (isset($go)) {
                     $this->_import($go);
                     $this->_post_construct($table_name, $id);
                     return $go;
                 } else {
                     set_cache($this, $cache_cond);
                 }
             }
         }
     }
     $result = $this->_initialize($table_name, $id);
     if (is_null($result)) {
         return NULL;
     }
     $this->_post_construct($table_name, $id);
     return $this;
 }
コード例 #8
0
 public function __construct()
 {
     parent::__construct();
     $this->_CI_load('library', 'type/Type_factory', 'type_factory');
     $this->type_factory = $this->CI->type_factory;
 }