Example #1
0
 /**
  * Constructor.
  * @param string $expression the JavaScript expression represented by this object
  * @param array $config additional configurations for this object
  */
 public function __construct($expression, $config = [])
 {
     $this->expression = $expression;
     parent::__construct($config);
 }
 /**
  * Constructor.
  * @param array $cookies the cookies that this collection initially contains. This should be
  * an array of name-value pairs.
  * @param array $config name-value pairs that will be used to initialize the object properties
  */
 public function __construct($cookies = [], $config = [])
 {
     $this->_cookies = $cookies;
     parent::__construct($config);
 }
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->rules = $this->createRules();
 }
Example #4
0
 /**
  * Constructor.
  * @param Command $command the command generating the query result
  * @param array $config name-value pairs that will be used to initialize the object properties
  */
 public function __construct(Command $command, $config = [])
 {
     $this->_statement = $command->pdoStatement;
     $this->_statement->setFetchMode(\PDO::FETCH_ASSOC);
     parent::__construct($config);
 }
Example #5
0
 /**
  * Constructor.
  * @param Connection $connection the database connection.
  * @param array $config name-value pairs that will be used to initialize the object properties
  */
 public function __construct($connection, $config = [])
 {
     $this->db = $connection;
     parent::__construct($config);
 }
Example #6
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->db = Instance::ensure($this->db, Object::className());
 }
 /**
  * Create a column schema builder instance giving the type and value precision.
  *
  * @param string $type type of the column. See [[$type]].
  * @param integer|string|array $length length or precision of the column. See [[$length]].
  * @param array $config name-value pairs that will be used to initialize the object properties
  */
 public function __construct($type, $length = null, $config = [])
 {
     $this->type = $type;
     $this->length = $length;
     parent::__construct($config);
 }