當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。