当前位置: 首页>>代码示例>>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;未经允许,请勿转载。