示例#1
0
文件: Flash.php 项目: tourze/session
 /**
  * Constructor
  *
  * @param  array $settings
  */
 public function __construct($settings = [])
 {
     $this->settings = array_merge($this->settings, $settings);
     $this->messages = ['prev' => [], 'next' => [], 'now' => []];
     // 加载会话消息
     $this->loadMessages();
     parent::__construct();
 }
示例#2
0
文件: Model.php 项目: tourze/model
 /**
  * 读取指定模型值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);
     }
 }
示例#3
0
文件: Base.php 项目: tourze/view
 /**
  * {@inheritdoc}
  */
 public function init()
 {
     parent::init();
     if (null !== $this->_file) {
         $this->setFilename($this->_file);
     }
 }