本文整理汇总了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.');
}
}
示例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');
}
}
示例3: init
public function init()
{
$this->_error = true;
$this->_message = [];
$this->_format = \yii\web\Response::FORMAT_JSON;
return parent::init();
}
示例4: init
public function init()
{
if (!yii::$app->user->isGuest) {
$this->_userId = yii::$app->user->id;
}
return parent::init();
}
示例5: init
public function init()
{
parent::init();
if (!isset($this->key)) {
throw new InvalidConfigException('JWPlayer: License key missing!');
}
}
示例6: init
public function init()
{
parent::init();
$configFile = Yii::getAlias($this->configFileName);
$this->config = (require $configFile);
$this->instance = new \OneLogin_Saml2_Auth($this->config);
}
示例7: init
/**
*
*/
public function init()
{
parent::init();
if ($this->placeholder) {
$this->placeholder = Yii::createObject($this->placeholder);
}
}
示例8: init
public function init()
{
parent::init();
$this->isGlobal = $this->name === 'global';
$this->isCustomization = $this->name === 'custom';
$this->isInternal = $this->name === 'internal';
}
示例9: init
public function init()
{
parent::init();
if (!$this->_localFormatPhp) {
$this->_localFormatPhp = FormatConverter::convertDateIcuToPhp($this->localFormat[1], $this->localFormat[0]);
}
}
示例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'));
}
}
示例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');
}
}
示例12: init
public function init()
{
parent::init();
if (!empty($this->fileHash)) {
$this->fileInfo = FileInfo::findOne(['hash' => $this->fileHash]);
}
}
示例13: init
public function init()
{
parent::init();
if ($this->identifier == null) {
$this->identifier = uniqid();
}
}
示例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.');
}
}
示例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\';`');
}
}