コード例 #1
0
ファイル: Row.php プロジェクト: leopacheco/zf-rest
 /**
  * {@inheritdoc}
  * @internal
  */
 public function __call($method, array $args)
 {
     $column = String::dasherize(substr($method, 3));
     $isSetterOrGetter = substr($method, 0, 3);
     if ('get' === $isSetterOrGetter && $this->offsetExists($column)) {
         return $this->__get($column);
     } elseif ('set' === $isSetterOrGetter && $this->offsetExists($column)) {
         return $this->__set($column, $args[0]);
     } else {
         return parent::__call($method, $args);
     }
 }