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


PHP Object::init方法代码示例

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


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

示例1: init

 /**
  * {@inheritdoc}
  */
 public function init()
 {
     parent::init();
     if (is_null($this->remote)) {
         throw new InvalidConfigException('$remote must be set.');
     }
 }
开发者ID:lxpgw,项目名称:logger,代码行数:10,代码来源:Pubu.php

示例2: init

 /**
  * @inheritdoc
  * @throws \BadMethodCallException
  */
 public function init()
 {
     parent::init();
     if (exec('command -v java >/dev/null && echo "yes" || echo "no"') == 'no') {
         throw new \BadMethodCallException('Java Not Installed');
     }
 }
开发者ID:lajax,项目名称:yii2-asset-minifier,代码行数:11,代码来源:CliMinifier.php

示例3: init

 public function init()
 {
     $this->_error = true;
     $this->_message = [];
     $this->_format = \yii\web\Response::FORMAT_JSON;
     return parent::init();
 }
开发者ID:spiro-stathakis,项目名称:projects,代码行数:7,代码来源:AjaxResponse.php

示例4: init

 public function init()
 {
     if (!yii::$app->user->isGuest) {
         $this->_userId = yii::$app->user->id;
     }
     return parent::init();
 }
开发者ID:spiro-stathakis,项目名称:projects,代码行数:7,代码来源:SecurityComponent.php

示例5: init

 public function init()
 {
     parent::init();
     if (!isset($this->key)) {
         throw new InvalidConfigException('JWPlayer: License key missing!');
     }
 }
开发者ID:wadeshuler,项目名称:yii2-jwplayer,代码行数:7,代码来源:JWConfig.php

示例6: init

 public function init()
 {
     parent::init();
     $configFile = Yii::getAlias($this->configFileName);
     $this->config = (require $configFile);
     $this->instance = new \OneLogin_Saml2_Auth($this->config);
 }
开发者ID:asasmoyo,项目名称:yii2-saml,代码行数:7,代码来源:Saml.php

示例7: init

 /**
  *
  */
 public function init()
 {
     parent::init();
     if ($this->placeholder) {
         $this->placeholder = Yii::createObject($this->placeholder);
     }
 }
开发者ID:voodoo-mobile,项目名称:yii2-image,代码行数:10,代码来源:ImageAttributeDescriptor.php

示例8: init

 public function init()
 {
     parent::init();
     $this->isGlobal = $this->name === 'global';
     $this->isCustomization = $this->name === 'custom';
     $this->isInternal = $this->name === 'internal';
 }
开发者ID:DevGroup-ru,项目名称:dotplant-monster,代码行数:7,代码来源:MonsterGroup.php

示例9: init

 public function init()
 {
     parent::init();
     if (!$this->_localFormatPhp) {
         $this->_localFormatPhp = FormatConverter::convertDateIcuToPhp($this->localFormat[1], $this->localFormat[0]);
     }
 }
开发者ID:maddoger,项目名称:yii2-core,代码行数:7,代码来源:DateTimeAttribute.php

示例10: init

 public function init()
 {
     parent::init();
     if ($this->properties === TRUE && \Yii::$container->has('jarekkozak\\sys\\IProperties')) {
         $this->setProperties(\Yii::$container->get('jarekkozak\\sys\\IProperties'));
     }
 }
开发者ID:jarekkozak,项目名称:yii2-libs,代码行数:7,代码来源:Outlook.php

示例11: init

 /**
  * Initializes the application component
  *
  * @throws InvalidConfigException
  */
 public function init()
 {
     parent::init();
     if (!class_exists('\\AmoCRM\\Client')) {
         throw new InvalidConfigException('AmoCRM not found. Try to install it via composer require dotzero/amocrm');
     }
 }
开发者ID:dotzero,项目名称:yii2-amocrm,代码行数:12,代码来源:Client.php

示例12: init

 public function init()
 {
     parent::init();
     if (!empty($this->fileHash)) {
         $this->fileInfo = FileInfo::findOne(['hash' => $this->fileHash]);
     }
 }
开发者ID:JiltImageBoard,项目名称:jilt-backend,代码行数:7,代码来源:PostedFile.php

示例13: init

 public function init()
 {
     parent::init();
     if ($this->identifier == null) {
         $this->identifier = uniqid();
     }
 }
开发者ID:jarekkozak,项目名称:yii2-libs,代码行数:7,代码来源:KieFact.php

示例14: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->href === null) {
         throw new InvalidConfigException('The href attribute can not be empty and must be set trough configuration array.');
     }
 }
开发者ID:luyadev,项目名称:luya-core,代码行数:10,代码来源:ExternalLink.php

示例15: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->module === null) {
         throw new Exception('The ActiveWindow property \'module\' of ' . get_called_class() . ' can not be null. You have to defined the module in where the ActiveWindow is defined. For example `public $module = \'@admin\';`');
     }
 }
开发者ID:luyadev,项目名称:luya-module-admin,代码行数:10,代码来源:ActiveWindow.php


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