/** * Constructor * * @param array $settings */ public function __construct($settings = []) { $this->settings = array_merge($this->settings, $settings); $this->messages = ['prev' => [], 'next' => [], 'now' => []]; // 加载会话消息 $this->loadMessages(); parent::__construct(); }
/** * 读取指定模型值Handles retrieval of all model values, relationships, and metadata. * * [!!] 一般情况下,不用覆盖整个方法 * * @param string $name Column name * @return mixed */ public function __get($name) { try { return parent::__get($name); } catch (InvalidCallException $e) { return $this->get($name); } }
/** * {@inheritdoc} */ public function init() { parent::init(); if (null !== $this->_file) { $this->setFilename($this->_file); } }