__call() public method

Set/Get attribute wrapper
public __call ( string $method, array $args ) : mixed | Object
$method string Method
$args array Arguments
return mixed | Object
Beispiel #1
0
 /**
  * Set/Get attribute wrapper
  *
  * @param string $method Method
  * @param array  $args   Args
  *
  * @return  \Zend\Db\TableGateway\TableGateway
  */
 public function __call($method, $args)
 {
     if (empty(self::$tables[$this->name])) {
         $this->__construct();
     }
     if (method_exists(self::$tables[$this->name], $method)) {
         return call_user_func_array(array(self::$tables[$this->name], $method), $args);
     }
     return parent::__call($method, $args);
 }