当前位置: 首页>>代码示例>>PHP>>正文


PHP ActiveRecord::__construct方法代码示例

本文整理汇总了PHP中ActiveRecord::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ActiveRecord::__construct方法的具体用法?PHP ActiveRecord::__construct怎么用?PHP ActiveRecord::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ActiveRecord的用法示例。


在下文中一共展示了ActiveRecord::__construct方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

 function __construct()
 {
     // Call the parent constructor
     parent::__construct('account_info', DB_DEFAULT);
     // Set the relationships
     $this->HasOne('User');
     // Set the Required
     $this->SetRequired(array('user_id', 'name'));
 }
开发者ID:nickdenardis,项目名称:formspring-extender,代码行数:9,代码来源:accountinfo.php

示例2:

 function __construct()
 {
     // Call the parent constructor
     parent::__construct('answers', DB_DEFAULT);
     // Set the relationships
     $this->HasMany('Category', 'AnswerCategory');
     // Set the Required
     $this->SetRequired(array('user_id', 'question_id', 'question', 'date_asked'));
 }
开发者ID:nickdenardis,项目名称:formspring-extender,代码行数:9,代码来源:answer.php

示例3: __construct

 /**
  * The constructor of Model class
  *
  * @param mixed $data Data for filling the model
  *
  * @return void
  */
 public function __construct($data = null)
 {
     $this->_setUp();
     $this->setUpData($data);
     parent::__construct();
     $this->_loadRelations();
     $this->_oldPrimaryKey = array();
     $this->_savePrimaryKey();
 }
开发者ID:andreums,项目名称:framework1.5,代码行数:16,代码来源:Model.class.php

示例4:

 function __construct()
 {
     // Call the parent constructor
     parent::__construct('users', DB_DEFAULT);
     // Set the relationships
     $this->HasOne('AccountInfo');
     $this->HasMany('Category');
     // Set the Required
     $this->SetRequired(array('username', 'oauth_token', 'oauth_token_secret'));
 }
开发者ID:nickdenardis,项目名称:formspring-extender,代码行数:10,代码来源:user.php

示例5:

 function __construct()
 {
     // Call the parent constructor
     parent::__construct('answer_category', DB_DEFAULT);
     // Set the relationships
     $this->HasMany('Answer');
     $this->HasMany('Category');
     // Set the Required
     $this->SetRequired(array('answer_id', 'category_id'));
 }
开发者ID:nickdenardis,项目名称:formspring-extender,代码行数:10,代码来源:answercategory.php

示例6:

 function __construct()
 {
     // Call the parent constructor
     parent::__construct('categories', DB_DEFAULT);
     // Set the relationships
     $this->HasMany('Answer', 'AnswerCategory');
     $this->BelongsTo('User');
     // Set the Required
     $this->SetRequired(array('user_id', 'status', 'category'));
 }
开发者ID:nickdenardis,项目名称:formspring-extender,代码行数:10,代码来源:category.php

示例7: __construct

 /**
  * Session constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (is_null(static::$config) && isset($GLOBALS['config'])) {
         static::$config = $GLOBALS['config'];
     }
     // User information
     if (php_sapi_name() != 'cli' && !isset($_SERVER['REMOTE_ADDR'])) {
         throw new ErrorException('Unable to determine your IP address.');
     }
     $this->userip = DetectProxy();
     if (empty($this->userip)) {
         $this->userip = $_SERVER['REMOTE_ADDR'];
     }
     $this->useragent = isset($_SERVER['HTTP_USER_AGENT']) ? substr($_SERVER['HTTP_USER_AGENT'], 0, 100) : '';
     // Filter out long numbers (4+ digits)
     $this->useragent = preg_replace('/([0-9]{4,12})/', '', $this->useragent);
     // Filter out version except major version number
     $this->useragent = preg_replace('/([0-9]{1,10})([\\._-])?([0-9]{1,10})?([\\._-])?([0-9]{1,10})?([\\._-])?([0-9]{1,10})?([\\._-])?([0-9]{1,10})?/', '$1', $this->useragent);
 }
开发者ID:Strikethegod,项目名称:fanzub,代码行数:23,代码来源:class.session.php

示例8:

 function __construct($id = null)
 {
     parent::__construct($id);
 }
开发者ID:radicaldesigns,项目名称:gtd,代码行数:4,代码来源:Estimate.php

示例9: __construct

 public function __construct($group_name = '')
 {
     parent::__construct();
     $this->initDb($group_name);
 }
开发者ID:songliang89,项目名称:my-ci,代码行数:5,代码来源:MY_Model.php

示例10: __construct

 public function __construct($id = 0)
 {
     parent::__construct($id);
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:4,代码来源:class.srCertificateDefinition.php

示例11: __construct

 public function __construct($id = 0)
 {
     parent::__construct($id);
     $this->pl = ilCertificatePlugin::getInstance();
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:5,代码来源:class.srCertificatePlaceholderValue.php

示例12: __construct

 /**
  * @param int  $primary_key
  * @param bool $dev
  */
 public function __construct($primary_key = 0, $dev = false)
 {
     parent::__construct($primary_key, new arConnectorSession());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.arMessage.php

示例13: __construct

 public function __construct($id = 0)
 {
     global $ilLog, $ilAppEventHandler;
     parent::__construct($id);
     $this->log = $ilLog;
     $this->pl = ilCertificatePlugin::getInstance();
     $this->event_handler = $ilAppEventHandler;
 }
开发者ID:studer-raimann,项目名称:Certificate,代码行数:8,代码来源:class.srCertificate.php

示例14: __construct

 public function __construct($scenario = 'insert', $api_name = null)
 {
     $this->_api_name = $api_name;
     parent::__construct($scenario);
 }
开发者ID:blindest,项目名称:Yii-CMS-2.0,代码行数:5,代码来源:MediaFile.php


注:本文中的ActiveRecord::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。