Ejemplo n.º 1
0
 /**
  * Set/Get attribute wrapper
  *
  * @param   string $method
  * @param   array $args
  * @return  mixed
  */
 public function __call($method, $args)
 {
     switch (substr($method, 0, 3)) {
         case 'get':
             $key = $this->_underscore(substr($method, 3));
             return $this->getData($key);
         case 'set':
             $key = $this->_underscore(substr($method, 3));
             return $this->setData($key, $args[0]);
         case 'uns':
             $key = $this->_underscore(substr($method, 3));
             return $this->unsData($key);
         case 'has':
             $key = $this->_underscore(substr($method, 3));
             return $this->hasData($key);
     }
     tx_fbmagento_tools::throwException("Invalid method " . get_class($this) . "::" . $method . "(" . print_r($args, 1) . ")");
 }