PHP 클래스 Helthe\Component\Turbolinks\Turbolinks

파일 보기 프로젝트 열기: helthe/turbolinks 1 사용 예제들

공개 메소드들

메소드 설명
decorateResponse ( Request $request, Response $response ) Modifies the HTTP headers and status code of the Response so that it can be properly handled by the Turbolinks javascript.

비공개 메소드들

메소드 설명
addRequestMethodCookie ( Request $request, Response $response ) Adds a cookie with the request method for non-GET requests. If a cookie is present and the request is GET, the cookie is removed to work better with caching solutions. The turbolinks will not initialize if the cookie is set.
canHandleRedirect ( Request $request ) : boolean Checks if the request can handle a Turbolink redirect. You need to have a session and a XHR request header to handle a redirect.
getUrlOrigin ( string $url ) : array Parse the given url into an origin array with the scheme, host and port.
haveSameOrigin ( Request $request, Response $response ) : boolean Checks if the request and the response have the same origin.
modifyStatusCode ( Request $request, Response $response ) Modifies the response status code. Checks for cross domain redirects and blocks them.

메소드 상세

decorateResponse() 공개 메소드

Modifies the HTTP headers and status code of the Response so that it can be properly handled by the Turbolinks javascript.
public decorateResponse ( Request $request, Response $response )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response