/** * Handle "magic" calls * * @param $method * @param $args * * @return $this|bool */ public function __call($method, $args) { list($action, $target) = \Genesis\Utils\Common::resolveDynamicMethod($method); switch ($action) { case 'is': if (isset($this->status)) { return $this->compare($target); } break; default: break; } return null; }
/** * Convert Pascal to Camel case and set the correct property * * @param $method * @param $args * * @return $this */ public function __call($method, $args) { list($action, $target) = \Genesis\Utils\Common::resolveDynamicMethod($method); switch ($action) { case 'get': if (property_exists($this, $target)) { return $this->{$target}; } break; case 'set': if (property_exists($this, $target)) { $this->{$target} = trim(reset($args)); return $this; } break; } return $this; }