protected function methodToAction($method, $collection = false)
    {
        if ($method == 'GET' && $collection) {
            $method = $method . '-collection';
        }
        return isset($this->methodToAction[$method]) ? $this->methodToAction[$method] : $this->defaultAction;
    }
protected function methodToAction($method, $collection = false)
    {
        if ($method == 'GET' && $collection) {
            $method = $method . '-collection';
        }
        return isset($this->methodToAction[$method]) ? $this->methodToAction[$method] : $this->defaultAction;
    }
protected function methodToAction ( $ method , $ collection = false ) { if ( $ method == 'GET' && $ collection ) { $ method = $ method . '-collection' ; } return isset ( $ this -> methodToAction [ $ method ] ) ? $ this -> methodToAction [ $ method ] : $ this -> defaultAction ; }
Convert HTTP method to action name

@param string $method
@param bool $collection
@return string
Convert HTTP method to action name