public function toArray($method)
    {
        $vars = get_object_vars($this);
        $className = explode('\\', get_called_class());
        return $vars + array('model' => end($className));
    }
public function toArray($method)
    {
        $vars = get_object_vars($this);
        $className = explode('\\', get_called_class());
        return $vars + array('model' => end($className));
    }
public function toArray ( $ method ) { $ vars = get_object_vars ( $ this ) ; $ className = explode ( '\\' , get_called_class ( ) ) ; return $ vars + array ( 'model' => end ( $ className ) ) ; }
Convert object to an associative array

@param string $method The API method called

@return array
Convert object to an associative array