示例#1
0
 /**
  * Magic method to return the meta data like the post original fields
  *
  * @param string $key
  * @return string
  */
 public function __get($key)
 {
     if (!isset($this->{$key})) {
         if (isset($this->term->{$key})) {
             return $this->term->{$key};
         }
     }
     return parent::__get($key);
 }
示例#2
0
文件: Post.php 项目: brad82/corcel
 public function save(array $options = array())
 {
     if (isset($this->attributes[$this->primaryKey])) {
         $this->meta->save($this->attributes[$this->primaryKey]);
     }
     return parent::save($options);
 }