protected function beforeSave() { if (parent::beforeSave()) { if ($this->isNewRecord) { $this->ticket = $this->createTicket(); $this->ip = $this->retrieveClientIp(); } return true; } return false; }
public static function model($className = __CLASS__) { return parent::model($className); }