當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBObject::__construct方法代碼示例

本文整理匯總了PHP中DBObject::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBObject::__construct方法的具體用法?PHP DBObject::__construct怎麽用?PHP DBObject::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DBObject的用法示例。


在下文中一共展示了DBObject::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Data constructor
  * 
  * @param int $id Optional - if set gets data from PID = $id
  * @param string $class Option - if set then sets className directly
  */
 public function __construct($id = NULL, $class = NULL)
 {
     if ($class) {
         $this->setClassName($class);
     }
     parent::__construct($id);
 }
開發者ID:uhtoff,項目名稱:eCRF,代碼行數:13,代碼來源:Data.php

示例2: __construct

 public function __construct($table_name, $columns, $id = null)
 {
     if (!is_array(ORMObject::$_data)) {
         ORMObject::$_data = array();
     }
     parent::__construct($table_name, $columns, $id);
 }
開發者ID:sbazemore,項目名稱:simple-php-framework,代碼行數:7,代碼來源:class.ormobject.php

示例3: Exception

 /**
  * Constructor
  * @param {string} Name for this object
  * @param {integer} $manga Manga ID
  * @throws Exception when
  * - cannot contact database
  * - invalid manga ID
  */
 function __construct($file, $manga)
 {
     parent::__construct($file);
     if ($manga <= 0) {
         $this->errormsg = "Resultados::Construct invalid Manga ID: {$manga}";
         throw new Exception($this->errormsg);
     }
     $this->manga = $this->__getArray("Mangas", $manga);
     if (!is_array($this->manga)) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get info on manga:{$manga}";
         throw new Exception($this->errormsg);
     }
     $this->jornada = $this->__getArray("Jornadas", $this->manga['Jornada']);
     if (!is_array($this->jornada)) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get jornada info on jornada:{$this->manga['Jornada']} manga:{$manga}";
         throw new Exception($this->errormsg);
     }
     $this->prueba = $this->__getArray("Pruebas", $this->jornada['Prueba']);
     if (!is_array($this->prueba)) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get prueba info on prueba:{$this->jornada['Prueba']} jornada:{$this->manga['Jornada']} manga:{$manga}";
         throw new Exception($this->errormsg);
     }
     $this->federation = Federations::getFederation(intval($this->prueba['RSCE']));
     if ($this->federation == null) {
         $this->errormsg = "OrdenSalida::construct(): Cannot get federation info on prueba:{$this->jornada['Prueba']} jornada:{$this->manga['Jornada']} manga:{$manga}";
         throw new Exception($this->errormsg);
     }
 }
開發者ID:nedy13,項目名稱:AgilityContest,代碼行數:36,代碼來源:OrdenSalida.php

示例4: __construct

 public function __construct($id = false)
 {
     if (empty($id)) {
         $this->Created = time();
         $this->Modified = time();
     }
     parent::__construct($id);
 }
開發者ID:acdha,項目名稱:impphp,代碼行數:8,代碼來源:Document.php

示例5: __construct

 public function __construct($id = '')
 {
     parent::__construct('tags', array('name'), '');
     $this->select($id, 'name');
     if ($this->id == '') {
         $this->name = $id;
         $this->insert();
     }
 }
開發者ID:farzam65,項目名稱:YetiShare-File-Hosting-Script-Free,代碼行數:9,代碼來源:class.tag.php

示例6: __construct

 public function __construct($init = null, $key = 0)
 {
     parent::__construct();
     $this->_objType = 'categories_category';
     $this->_objPath = 'category';
     $this->_objPermissionFilter[] = array('component_left' => 'ZikulaCategoriesModule', 'component_middle' => '', 'component_right' => '', 'instance_left' => 'id', 'instance_middle' => 'ipath', 'instance_right' => 'path', 'level' => ACCESS_READ);
     $this->_objValidation['name'] = array('name', true, 'noop', '', __('Error! You did not enter a name.'), '');
     $this->_init($init, $key);
 }
開發者ID:Silwereth,項目名稱:core,代碼行數:9,代碼來源:Category.php

示例7: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'persist_users';
     $meta['name'] = 'PersistUser';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'integer', 'random' => 'integer', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:PersistUserObj.obj.php

示例8: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'components';
     $meta['name'] = 'Component';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'filename' => array('type' => 'string', 'string_size' => 1024), 'options' => 'text', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:ComponentObj.obj.php

示例9: array

 function __construct($meta = array(), array $options = array())
 {
     $fields = $meta['fields'];
     $fields['mime_type'] = array_key_exists('mime_type', $fields) ? $fields['mime_type'] : 'string';
     $fields['from_db'] = array_key_exists('from_db', $fields) ? $fields['from_db'] : 'boolean';
     $fields['content'] = array_key_exists('content', $fields) ? $fields['content'] : 'long_blob';
     $fields['meta_info'] = array_key_exists('meta_info', $fields) ? $fields['meta_info'] : 'serialized';
     $meta['fields'] = $fields;
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:FileObject.obj.php

示例10: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'b_e_filters';
     $meta['name'] = 'BEFilter';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'description' => 'text', 'class' => 'string', 'function' => 'string', 'options' => 'string', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:BEFilterObj.obj.php

示例11: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'themes';
     $meta['name'] = 'Theme';
     $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'description' => 'text', 'screenshot' => 'string (default)', 'path' => 'string', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:ThemeObj.obj.php

示例12: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'assignments';
     $meta['name'] = 'Assignment';
     $meta['fields'] = array('id' => 'primarykey', 'access_type' => 'string', 'access_id' => 'integer', 'role_id' => 'integer', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:AssignmentObj.obj.php

示例13: Exception

 /**
  * Constructor
  * @param {string} $file caller for this object
  * @param {integer} $prueba Prueba ID for these jornadas
  * @throws Exception if cannot contact database
  */
 function __construct($file, $prueba)
 {
     parent::__construct($file);
     if ($prueba < 0) {
         $this->errormsg = "{$file}::construct() invalid prueba ID";
         throw new Exception($this->errormsg);
     }
     $this->prueba = $prueba;
     $this->jueces = array("1" => "-- Sin asignar --");
 }
開發者ID:nedy13,項目名稱:AgilityContest,代碼行數:16,代碼來源:Jornadas.php

示例14: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_files';
     $meta['name'] = 'BackendFile';
     $meta['fields'] = array('id' => 'primarykey', 'name' => array('type' => 'string', 'string_size' => 255), 'file' => array('type' => 'string', 'string_size' => 1024), 'version' => array('type' => 'string', 'string_size' => 10), 'dependencies' => 'text', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:BackendFileObj.obj.php

示例15: array

 function __construct($meta = array(), array $options = array())
 {
     if (!is_array($meta) && is_numeric($meta)) {
         $meta = array('id' => $meta);
     }
     $meta['table'] = 'backend_errors';
     $meta['name'] = 'BackendErrors';
     $meta['fields'] = array('id' => 'primarykey', 'user_id' => 'current_user', 'mode' => array('type' => 'string', 'string_size' => 255), 'request' => 'current_request', 'query' => 'current_query', 'number' => 'number', 'string' => 'large_string', 'file' => 'string', 'line' => 'number', 'context' => 'string', 'stacktrace' => 'text', 'added' => 'lastmodified');
     return parent::__construct($meta, $options);
 }
開發者ID:jrgns,項目名稱:backend-php,代碼行數:10,代碼來源:BackendErrorObj.obj.php


注:本文中的DBObject::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。