public function getMethodByAction($action)
    {
        foreach ($this->methods as $method => $actions) {
            if (in_array($action, $actions)) {
                return $method;
            }
        }

        return 'get';
    }
public function getMethodByAction($action)
    {
        foreach ($this->methods as $method => $actions) {
            if (in_array($action, $actions)) {
                return $method;
            }
        }

        return 'get';
    }
public function getMethodByAction ( $ action ) { foreach ( $ this -> methods as $ method => $ actions ) { if ( in_array ( $ action , $ actions ) ) { return $ method ; } } return 'get' ; }
Retrieve the corresponding method to use
@param  string $action Action name
@return string
Retrieve the corresponding method to use