Hi all,
I have an application working, with normal MVC pattern, rendering views with full data in it. I created routers and controllers for a new API, in the same app and I want to consume then from my frontendControllers for example, without the need of creating a curl request (wich will create a new process, environment etc each time)
Actually I'm triying with some kind of HMVC paradigm, using this:
    public function indexAction()
    {
        // call to the api
        $result = $this->dispatcher->forward(array(
            'action' => 'edit',
            'controller' => 'index',
            'module' => 'user',
            'namespace' => 'App\User\Controllers\Api'
        )); 
        var_dump($result);
    }
but it lacks the http verbs and the request contents. Any clue of how can I accomplish it?