public function getTimetableHtml($args)
    {
        $args['_controller'] = 'CanalTPMttBundle:Timetable:view';
        $subRequest = $this->co->get('request')->duplicate(array(), null, $args);
        $subRequest->headers->remove('X-Requested-With');

        return $this->co->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST)->getContent();
    }
public function getTimetableHtml($args)
    {
        $args['_controller'] = 'CanalTPMttBundle:Timetable:view';
        $subRequest = $this->co->get('request')->duplicate(array(), null, $args);
        $subRequest->headers->remove('X-Requested-With');

        return $this->co->get('http_kernel')->handle($subRequest, HttpKernelInterface::SUB_REQUEST)->getContent();
    }
public function getTimetableHtml ( $ args ) { $ args [ '_controller' ] = 'CanalTPMttBundle:Timetable:view' ; $ subRequest = $ this -> co -> get ( 'request' ) -> duplicate ( array ( ) , null , $ args ) ; $ subRequest -> headers -> remove ( 'X-Requested-With' ) ; return $ this -> co -> get ( 'http_kernel' ) -> handle ( $ subRequest , HttpKernelInterface :: SUB_REQUEST ) -> getContent ( ) ; }
We use http kernel to forward, would take more time using curl
We use http kernel to forward would take more time using curl