src/WPametu/API/RewriteParser.php
protected  function invoke($method_name, $request_method, array $arguments = []){
        $method_name = strtolower($request_method).'_'.$this->str->to_snake_case($method_name);
        // Check if method exists
        if( !is_callable([$this, $method_name]) ){
            return false;
        }
        // Check accessibility
        $reflection = new \ReflectionMethod($this, $method_name);
        if( !$reflection->isPublic() || $reflection->isStatic() ){
            return false;
        }
        // Check required arguments length
        if( $reflection->getNumberOfRequiredParameters() > count($arguments) ){
            return false;
        }
        // O.K. It's public method. Call it.
        $this->handle_result(call_user_func_array([$this, $method_name], $arguments));
        return true;
    }
protected  function invoke($method_name, $request_method, array $arguments = []){
        $method_name = strtolower($request_method).'_'.$this->str->to_snake_case($method_name);
        // Check if method exists
        if( !is_callable([$this, $method_name]) ){
            return false;
        }
        // Check accessibility
        $reflection = new \ReflectionMethod($this, $method_name);
        if( !$reflection->isPublic() || $reflection->isStatic() ){
            return false;
        }
        // Check required arguments length
        if( $reflection->getNumberOfRequiredParameters() > count($arguments) ){
            return false;
        }
        // O.K. It's public method. Call it.
        $this->handle_result(call_user_func_array([$this, $method_name], $arguments));
        return true;
    }
protected function invoke ( $ method_name , $ request_method , array $ arguments = [ ] ) { $ method_name = strtolower ( $ request_method ) . '_' . $ this -> str -> to_snake_case ( $ method_name ) ; // Check if method exists if ( ! is_callable ( [ $ this , $ method_name ] ) ) { return false ; } // Check accessibility $ reflection = new \ ReflectionMethod ( $ this , $ method_name ) ; if ( ! $ reflection -> isPublic ( ) || $ reflection -> isStatic ( ) ) { return false ; } // Check required arguments length if ( $ reflection -> getNumberOfRequiredParameters ( ) > count ( $ arguments ) ) { return false ; } // O.K. It's public method. Call it. $ this -> handle_result ( call_user_func_array ( [ $ this , $ method_name ] , $ arguments ) ) ; return true ; }
Search method and execute if exists.

@param string $method_name
@param string $request_method
@param array $arguments
@return bool
Search method and execute if exists .