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


PHP AppModel::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($id = false, $table = null, $ds = null)
 {
     $this->actsAs['Uploader.FileValidation']['file_name']['extension']['value'] = Configure::read('Rule.FileExtensions');
     $this->actsAs['Uploader.FileValidation']['file_name']['filesize']['value'] = Configure::read('Rule.MaxFileSize') * 1024 * 1024;
     $this->actsAs['Uploader.FileValidation']['file_name']['filesize']['message'] = 'Dosya çok büyük; maximum boyut ' . Configure::read('Rule.MaxFileSize') . 'MB';
     parent::__construct($id, $table, $ds);
 }
开发者ID:sentezyum,项目名称:case-record-system,代码行数:7,代码来源:CaseRecordFile.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->fix_unaries();
     $this->append_plugin_name_to_classes();
     $this->set_validation_messages();
 }
开发者ID:besimhu,项目名称:legacy,代码行数:7,代码来源:RssAppModel.php

示例3: __construct

/**
 * Constructor, used to tell this model to use the
 * database configured for ACL
 */
	public function __construct() {
		$config = Configure::read('Acl.database');
		if (!empty($config)) {
			$this->useDbConfig = $config;
		}
		parent::__construct();
	}
开发者ID:hungnt88,项目名称:5stars-1,代码行数:11,代码来源:Permission.php

示例4: __construct

 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     $this->INTERVAL_MIN = Configure::read('login_inspection_interval_min');
     $this->ATTEMPT_LIMIT = Configure::read('login_attempt_limit');
     $this->LOCKOUT_MIN = Configure::read('login_lockout_min');
 }
开发者ID:xstation1021,项目名称:kdkitchen,代码行数:7,代码来源:LoginAttempt.php

示例5:

 function __construct()
 {
     parent::__construct();
     if (!isset($this->Node)) {
         $this->Node = ClassRegistry::init('Node');
     }
 }
开发者ID:kevthunder,项目名称:arch,代码行数:7,代码来源:node_link.php

示例6: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct();
     $this->ClopeTransaction = ClassRegistry::init('ClopeClustering.ClopeTransaction');
     $this->ClopeCluster = ClassRegistry::init('ClopeClustering.ClopeCluster');
     $this->ClopeAttribute = ClassRegistry::init('ClopeClustering.ClopeAttribute');
 }
开发者ID:maxleonov,项目名称:cakephp-clope-clustering-plugin,代码行数:10,代码来源:Clope.php

示例7: __construct

 /**
  * Override the constructor to provide custom model finds
  *
  * @param mixed $modelId Set this ID for this model on startup, can also be an array of options, see above.
  * @param string $table Name of database table to use.
  * @param string $datasource DataSource connection name.
  */
 public function __construct($modelId = false, $table = null, $datasource = null)
 {
     parent::__construct($modelId, $table, $datasource);
     $this->findMethods['files'] = true;
     $this->findMethods['repository'] = true;
     $this->findMethods['user'] = true;
 }
开发者ID:superstarrajini,项目名称:cakepackages,代码行数:14,代码来源:Github.php

示例8: __construct

 /**
  * ItemAvailabilityTimes constructor.
  *
  * @param array|bool|int|string $id
  * @param null|string $table
  * @param null|string $ds
  */
 public function __construct($id, $table, $ds)
 {
     parent::__construct($id, $table, $ds);
     if (defined('REDIS_ENABLE') && empty($this->Redis)) {
         $this->Redis = new RedisModel();
     }
 }
开发者ID:kameshwariv,项目名称:testexample,代码行数:14,代码来源:ItemAvailabilityTimes.php

示例9: __construct

 public function __construct($title, $user_id, $date_created = NULL)
 {
     parent::__construct($date_created);
     $this->fields["title"] = array($title, "VARCHAR(512)");
     $this->fields["user_id"] = array($user_id, "INT(11), FOREIGN KEY(user_id) REFERENCES user_models(id) ON DELETE CASCADE");
     parent::construct_if_not_exists();
 }
开发者ID:spencerbartz,项目名称:horrie_international,代码行数:7,代码来源:adventure_model.php

示例10:

 function __construct($id = false, $table = null, $ds = null)
 {
     if (Configure::read() == 0) {
         $this->cakeError('error500');
     }
     parent::__construct($id, $table, $ds);
 }
开发者ID:johnulist,项目名称:adrotator,代码行数:7,代码来源:meio.php

示例11:

 function __construct()
 {
     parent::__construct();
     $this->ds = ldap_connect($this->host, $this->port);
     ldap_set_option($this->ds, LDAP_OPT_PROTOCOL_VERSION, 3);
     ldap_bind($this->ds, $this->user, $this->pass);
 }
开发者ID:stas,项目名称:intranet,代码行数:7,代码来源:ldap_user.php

示例12:

 function __construct()
 {
     $viewPaths = Configure::read('viewPaths');
     $this->path = $viewPaths[0] . 'themed' . DS;
     $this->data['Theme'] = null;
     parent::__construct();
 }
开发者ID:ritiksingh,项目名称:simpleflan,代码行数:7,代码来源:theme.php

示例13: __construct

 public function __construct($id = false, $table = null, $ds = null)
 {
     parent::__construct($id, $table, $ds);
     //$this->virtualFields = Set::merge($this->virtualFields, array(
     //			'distribution' => 'IF (Event.private=true AND Event.cluster=false, "Your organization only", IF (Event.private=true AND Event.cluster=true, "This server-only", IF (Event.private=false AND Event.cluster=true, "This Community-only", IF (Event.communitie=true, "Connected communities" , "All communities"))))',
     //	));
 }
开发者ID:x86Labs,项目名称:MISP,代码行数:7,代码来源:Event.php

示例14: __construct

 /**
  * Class constructor
  *
  * @param bool|int|string|array $id Set this ID for this model on startup.
  * @param string $table Name of database table to use.
  * @param string $ds DataSource connection name.
  */
 public function __construct($id = false, $table = null, $ds = null)
 {
     if (is_array($id)) {
         $alias = Hash::get($id, 'alias') ?: (Hash::get($id, 'table') ?: $this->alias);
         $id['alias'] = Inflector::singularize(preg_replace('/Table$/', '', $alias));
         $this->name = $this->alias = $this->alias($id['alias']);
         $schema = Hash::get($id, 'schema');
         if ($schema !== null) {
             $this->_schema = $schema;
         }
     }
     if ($table === null) {
         if ($this->name === null) {
             $this->name = isset($name) ? $name : get_class($this);
         }
         if ($this->alias === null) {
             $this->alias = isset($alias) ? $alias : $this->name;
         }
         $table = Inflector::tableize(preg_replace('/Table$/', '', $this->alias));
     }
     parent::__construct($id, $table, $ds);
     $this->entityClass(Inflector::singularize($this->name) . 'Entity');
     $this->initialize([]);
     $this->entity(false);
 }
开发者ID:josegonzalez,项目名称:cakephp-entity,代码行数:32,代码来源:Table.php

示例15: foreach

 function __construct($id = false, $table = null, $ds = null)
 {
     foreach ($this->actsAs['ActivityProvider']['find_options']['joins'] as $index => $join) {
         $this->actsAs['ActivityProvider']['find_options']['joins'][$index]['table'] = $this->fullTableName($join['alias']);
     }
     parent::__construct($id, $table, $ds);
 }
开发者ID:predominant,项目名称:candycane,代码行数:7,代码来源:journal.php


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