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


PHP BaseModel::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Create a new Folder Sharing Info instance
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->read_only = $this->getDataProperty('read_only');
     $this->shared_folder_id = $this->getDataProperty('shared_folder_id');
     $this->parent_shared_folder_id = $this->getDataProperty('parent_shared_folder_id');
 }
开发者ID:kunalvarma05,项目名称:dropbox-php-sdk,代码行数:12,代码来源:FolderSharingInfo.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->mapping->table = 'accounts';
     $this->bindPhotoModel();
     $this->bindAddressModel();
 }
开发者ID:sohflp,项目名称:Hooked,代码行数:7,代码来源:class.AccountModel.php

示例3: __construct

 public function __construct($params = null)
 {
     parent::__construct();
     if (isset($params['config'])) {
         $this->config = $params['config'];
     }
     $this->scriptsDir = sprintf('%s/upgrade', $this->config->paths->configs);
     $this->systems = array('readme', 'base', 'db', 'fs');
     $defaults = $this->config->defaults;
     $this->currentCodeVersion = $defaults->currentCodeVersion;
     $currentParts = explode('.', $this->currentCodeVersion);
     $this->currentCodeMajorVersion = $currentParts[0];
     $this->currentCodeMinorVersion = $currentParts[1];
     $this->currentCodeTrivialVersion = $currentParts[2];
     $siteConfig = $this->config->site;
     if (isset($siteConfig->lastCodeVersion) && !empty($siteConfig->lastCodeVersion)) {
         $this->lastCodeVersion = $siteConfig->lastCodeVersion;
     } else {
         $this->lastCodeVersion = $defaults->lastCodeVersion;
     }
     $lastParts = explode('.', $this->lastCodeVersion);
     $this->lastCodeMajorVersion = $lastParts[0];
     $this->lastCodeMinorVersion = $lastParts[1];
     $this->lastCodeTrivialVersion = $lastParts[2];
 }
开发者ID:gg1977,项目名称:frontend,代码行数:25,代码来源:Upgrade.php

示例4: __construct

 public function __construct(array $attributes = array())
 {
     $this->detectInformation();
     // Customize Rule
     parent::__construct($attributes);
     // TODO: Change the autogenerated stub
 }
开发者ID:vodanh624321,项目名称:laravel5,代码行数:7,代码来源:Prj02Inquire.php

示例5: foreach

 /**
  * 获取分表中的表名,获取数据库抽象类对象,获取Memcached抽象对象
  * @param $pid
  */
 function __construct($pid = '', $persister = false)
 {
     parent::__construct($pid);
     $this->dbConfig = BaseModel::getConfigVar('database');
     //v($this->dbConfig);
     $this->setTable();
     $dbName = "default";
     $child_classname = get_class($this);
     if (isset($this->dbConfig['config_map_class'])) {
         foreach ($this->dbConfig['config_map_class'] as $key => $row) {
             if (in_array($child_classname, $row)) {
                 $dbName = $key;
                 break;
             }
         }
     }
     $this->dbName = $dbName;
     //Slave数据库预连接
     if (empty($this->slaveDB)) {
         $this->slaveDB = $this->dbConnect($dbName, $persister);
     }
     //var_dump($this->slaveDB);
     if (empty($this->masterDB)) {
         $this->masterDB = $this->dbMasterConnect($dbName, $persister);
         //Master数据库预连接
     }
 }
开发者ID:weichaoduo,项目名称:zeromore,代码行数:31,代码来源:BaseDBModel.php

示例6:

 function __construct(DibiConnection $connection, ICacheStorage $cache, WidgetParamModel $widgetParamModel)
 {
     parent::__construct($connection, $cache);
     $this->table = 'widget';
     $this->widgetParamModel = $widgetParamModel;
     $this->__cronDelete();
 }
开发者ID:oaki,项目名称:demoshop,代码行数:7,代码来源:WidgetModel.php

示例7: __construct

 public function __construct($id = -1)
 {
     parent::__construct();
     $q = "SELECT * FROM BRDRequirements WHERE id = {$id}";
     $db = new Dbase();
     $res = $db->executeQuery($q);
     if ($res && $res->num_rows > 0) {
         if ($row = $res->fetch_assoc()) {
             $this->id = $row['id'];
             $this->BRD_ref_number = $row['BRD_ref_number'];
             $this->BRD_date = $row['BRD_date'];
             $this->approved = $row['approved'];
             $this->approved_by = $row['approved_by'];
             $this->approval_date = $row['approval_date'];
             $this->stakeholders = $row['stakeholders'];
             $this->stakeholder_BU = $row['stakeholder_BU'];
             $this->expected_impact_BU = $row['expected_impact_BU'];
             $this->stakeholder_approved = $row['stakeholder_approved'];
             $this->stk_app_date = $row['stk_app_date'];
             $this->responsible = $row['responsible'];
             $this->accountable = $row['accountable'];
             $this->consulted = $row['consulted'];
             $this->informed = $row['informed'];
         }
     }
     $res->free();
 }
开发者ID:pallavdiablo,项目名称:Panorama,代码行数:27,代码来源:model.BRDRequirement.php

示例8: __construct

 public function __construct(ConfigurationModel $config, NameModel $nameModel, Library $library)
 {
     parent::__construct($config);
     $this->nameModel = $nameModel;
     $this->siteId = $config->getSiteId();
     $this->library = $library;
 }
开发者ID:claryaldringen,项目名称:Backend,代码行数:7,代码来源:MenuModel.php

示例9: __construct

 public function __construct($attributes = null)
 {
     if (is_array($attributes)) {
         parent::__construct($attributes);
     }
     $this->validators = array('validate_username', 'validate_password');
 }
开发者ID:sofiak,项目名称:Tsoha-Bootstrap,代码行数:7,代码来源:User.php

示例10: __construct

 public function __construct($id = -1)
 {
     parent::__construct();
     $q = "SELECT * FROM RiskMitigationPlan WHERE id = {$id}";
     $db = new Dbase();
     $res = $db->executeQuery($q);
     if ($res && $res->num_rows > 0) {
         if ($row = $res->fetch_assoc()) {
             $this->id = $row['id'];
             $this->prelaunch_checklist = $row['prelaunch_checklist'];
             $this->UAT_required = $row['UAT_required'];
             $this->UAT_conducted_by = $row['UAT_conducted_by'];
             $this->UAT_date = $row['UAT_date'];
             $this->vetted_by_stakeholders = $row['vetted_by_stakeholders'];
             $this->feedback_taken_from = $row['feedback_taken_from'];
             $this->feedback = $row['feedback'];
             $this->feedback_incorporated = $row['feedback_incorporated'];
             $this->feedback_incorporation_date = $row['feedback_incorporation_date'];
             $this->final_UAT = $row['final_UAT'];
             $this->final_UAT_conducted_by = $row['final_UAT_conducted_by'];
             $this->final_sign_off = $row['final_sign_off'];
             $this->GTM_sign_off = $row['GTM_sign_off'];
             $this->SVP_sign_off = $row['SVP_sign_off'];
         }
     }
     $res->free();
 }
开发者ID:pallavdiablo,项目名称:Panorama,代码行数:27,代码来源:model.RiskMitigationPlan.php

示例11: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($configuration)
 {
     parent::__construct($configuration);
     $this->person = PersonReferenceModel::create($configuration['person']);
     $this->list = ListReferenceModel::create($configuration['list']);
     $this->alreadyMember = $configuration['already_member'];
 }
开发者ID:gollygood,项目名称:klaviyo-api-php,代码行数:10,代码来源:PersonListModel.php

示例12: __construct

 /**
  * Create a new CopyReference instance
  *
  * @param array $data
  */
 public function __construct(array $data)
 {
     parent::__construct($data);
     $this->expires = new DateTime($this->getDataProperty('expires'));
     $this->reference = $this->getDataProperty('copy_reference');
     $this->setMetadata();
 }
开发者ID:kunalvarma05,项目名称:dropbox-php-sdk,代码行数:12,代码来源:CopyReference.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->apiKey = Yii::app()->params['baiduPushApiKey'];
     $this->secretKey = Yii::app()->params['baiduPushSecretKey'];
     $this->channel = new Channel($this->apiKey, $this->secretKey);
 }
开发者ID:JimmyFung,项目名称:BmobTiQiuBa,代码行数:7,代码来源:BaiduPushModel.php

示例14: __construct

 public function __construct($pixie)
 {
     parent::__construct($pixie);
     $this->created_at = date('Y-m-d H:i:s');
     $this->status = self::STATUS_NEW;
     $this->amount = 0;
 }
开发者ID:nchervyakov,项目名称:evolve2,代码行数:7,代码来源:Order.php

示例15: __construct

 public function __construct($params = null)
 {
     parent::__construct();
     if (isset($params['utility'])) {
         $this->utility = $params['utility'];
     } else {
         $this->utility = new Utility();
     }
     if (isset($params['url'])) {
         $this->url = $params['url'];
     } else {
         $this->url = new Url();
     }
     if (isset($params['image'])) {
         $this->image = $params['image'];
     } else {
         $this->image = getImage();
     }
     if (isset($params['user'])) {
         $this->user = $params['user'];
     } else {
         $this->user = new User();
     }
     if (isset($params['config'])) {
         $this->config = $params['config'];
     }
 }
开发者ID:nicolargo,项目名称:frontend,代码行数:27,代码来源:Photo.php


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