Interface ApiControllerInterface
Interface registering all controller methods that should be refactoring into a base controller to provide helpers and avoid duplicating code and that are specific to this application, i.e. methods that are not in Symfony\Bundle\FrameworkBundle\Controller\Controller or which differs from it.
Direct known implementers
FrontBundle\Controller\BaseControllerIndirect known implementers
FrontBundle\Controller\JobController, FrontBundle\Controller\MandateController, FrontBundle\Controller\UserController
Namespace: FrontBundle\Controller
Author: Théo FIDRY theo.fidry@gmail.com
Located at FrontBundle/Controller/ApiControllerInterface.php
Author: Théo FIDRY theo.fidry@gmail.com
Located at FrontBundle/Controller/ApiControllerInterface.php
public
string
|
#
generateUrl( string $route, array $parameters = [], boolean|string $referenceType = FrontBundle\Controller\UrlGeneratorInterface::ABSOLUTE_PATH )
Generates a URL from the given parameters. |
public
array
|
|
public
Psr\Http\Message\RequestInterface
|
#
createRequest( string $method, string|null $url = null, Symfony\Component\HttpFoundation\Request|Psr\Http\Message\RequestInterface|string|null $token = null, array $options = [] )
Send a GET request for the client and decode its response body. |
public
array
|
#
requestAndDecode( string $method, string|null $url = null, Symfony\Component\HttpFoundation\Request|Psr\Http\Message\RequestInterface|string|null $token = null, array $options = [], boolean $wholeCollection = false )
Send a GET request for the client and decode its response body. |
public
array
|
#
sendAndDecode( Psr\Http\Message\RequestInterface $request, boolean $wholeCollection = false )
Sends a single request and decode its response body. |
public
|
#
handleGuzzleException( GuzzleHttp\Exception\TransferException $exception )
Handle Guzzle exceptions. Assumes the exception was thrown while sending a request to the API. For more information regarding Guzzle exceptions, refer to * http://guzzle.readthedocs.org/en/latest/quickstart.html#exceptions. |