/** * @return bool */ protected function beforeValidate() { if (is_array($this->properties) || is_object($this->properties)) { $this->properties = \CJSON::encode($this->properties); } else { if (!is_string($this->properties)) { $this->properties = ''; } } return parent::beforeValidate(); }
/** * @return bool */ protected function beforeValidate() { if ($this->sid_expiration && !is_numeric($this->sid_expiration)) { $this->sid_expiration = strtotime($this->sid_expiration); } return parent::beforeValidate(); }
/** * @return bool */ public function beforeValidate() { if (is_array($this->properties) || is_object($this->properties)) { $this->properties = \yii\helpers\Json::encode($this->properties); } else { if (!is_string($this->properties)) { $this->properties = ''; } } return parent::beforeValidate(); }