private function getKey(string $action, string $method, string $separator = '_')
    {
        //setSomeSample -> post/Some/Sample
        $key = preg_replace('/([A-Z0-9])/', $separator."$1", $method);
        //set/Some/Sample -> /some/sample
        return trim(strtolower(substr($key, strlen($action))), $separator);
    }
private function getKey(string $action, string $method, string $separator = '_')
    {
        //setSomeSample -> post/Some/Sample
        $key = preg_replace('/([A-Z0-9])/', $separator."$1", $method);
        //set/Some/Sample -> /some/sample
        return trim(strtolower(substr($key, strlen($action))), $separator);
    }
private function getKey ( string $ action , string $ method , string $ separator = '_' ) { //setSomeSample -> post/Some/Sample $ key = preg_replace ( '/([A-Z0-9])/' , $ separator . "$1" , $ method ) ; //set/Some/Sample -> /some/sample return trim ( strtolower ( substr ( $ key , strlen ( $ action ) ) ) , $ separator ) ; }
Used by magic methods, this is used to
parse out the method name and return
the translated meaning

@param string $action
@param string $method
@param string $separator

@return string
Used by magic methods this is used to parse out the method name and return the translated meaning