/** * @inheritdoc */ public function __construct($config = []) { // Init pathes $this->basePath = Yii::getAlias('@frontend') . '/web/images/store/'; $this->baseUrl = 'http://' . $_SERVER['HTTP_HOST'] . '/images/store/'; parent::__construct($config); }
public function __construct($config = array()) { $this->key_id = Yii::$app->user->getId(); $this->ip = Yii::$app->getRequest()->getUserIP(); $this->query = Yii::$app->getRequest()->getUrl(); parent::__construct($config); }
function __construct($config = array(), $type = false) { if ($type !== false) { self::$tabName = $type; } parent::__construct($config); }
/** * Counter constructor. * * @param int $type_id * @param array $config */ public function __construct($type_id = -1, $config = []) { if ($type_id > 0 && array_key_exists($type_id, static::getTypesArray())) { $this->type = $type_id; } parent::__construct($config); }
public function __construct($login = null, $config = []) { if (isset($login)) { if (static::findByLogin($login)) { throw new ErrorException('User with login "' . $login . '" already exists in Payture.'); } $this->login = $login; $this->generatePassword(); } parent::__construct($config); }
public function __construct($user = null, $scope = null, $config = []) { parent::__construct($config); // If creating new for a user, setup properties. if (!empty($user)) { $this->user_id = is_int($user) ? $user : $user->id; $this->code = $this->generateCode(); $this->scope = $scope; } static::maybeGarbageCollect(); }
public function __construct($maximumValidation = true, $config = []) { if (is_bool($maximumValidation)) { $this->maximumValidation = $maximumValidation; } else { $this->maximumValidation = true; $config = $maximumValidation; // probably $config passed as first // and only parameter } $this->yiiValidationRulesBuilder = new YiiValidationRulesBuilder($this->maximumValidation, self::tableName()); if (!isset(self::$ruleList[self::tableName()][$this->maximumValidation])) { if ($this->maximumValidation) { $this->buildStrictRules(); } else { $this->buildDefaultRules(); } } else { // for code coverage analysis } parent::__construct($config); }
public function __construct() { $this->id = '%%newid%%'; parent::__construct(); }
/** * @param array $config - Name-value pairs that will be used to initialize the object properties */ public function __construct($config = []) { $this->moduleId = isset($config['id']) ? $config['id'] : 'content'; parent::__construct(); }
public function __construct($config = []) { $this->attachBehavior('fileManager', require __DIR__ . '/behaviors/user-profile/filemanager.php'); parent::__construct($config); }
public function __construct($config = []) { parent::__construct($config); }
public function __construct($config = array()) { parent::__construct($config); $this->on(ActiveRecord::EVENT_BEFORE_INSERT, array($this, 'onSave')); $this->on(ActiveRecord::EVENT_BEFORE_UPDATE, array($this, 'onSave')); }
public function __construct($config = []) { $this->_transformers = static::createTransformers(); parent::__construct($config); }
/** * Mar constructor. * @param array $table * @param array $config */ public function __construct($table, $config = []) { self::$table = $table; parent::__construct($config); }