<?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Request;
use App\Modules\Structure\Service\RequestService;
class DefaultController extends BaseController
{
private $_requestService;
public function __construct(RequestService $requestService)
{
$this->_requestService = $requestService;
}
public function index(Request $request)
{
return $this->forward('App\Controller\DefaultController::execute', array('request' => $request, 'uri' => null));
}
public function execute(Request $request, $uri)
{
$response = $this->_requestService->processRequest($request, $uri);
if (!$response)
throw $this->createNotFoundException();
return $response;
}
}