PHP 클래스 Symfony\Bundle\FrameworkBundle\Controller\RedirectController

저자: Fabien Potencier ([email protected])
상속: extends Symfony\Component\DependencyInjection\ContainerAware
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

공개 메소드들

메소드 설명
redirectAction ( string $route, boolean $permanent = false ) : Response Redirects to another route.
urlRedirectAction ( string $path, boolean $permanent = false, boolean $scheme = null, integer $httpPort = 80, integer $httpsPort = 443 ) : Response Redirects to a URL.

메소드 상세

redirectAction() 공개 메소드

It expects a route path parameter. By default, the response status code is 301. If the route empty, the status code will be 410. If the permanent path parameter is set, the status code will be 302.
public redirectAction ( string $route, boolean $permanent = false ) : Response
$route string The route pattern to redirect to
$permanent boolean Whether the redirect is permanent or not
리턴 Symfony\Component\HttpFoundation\Response A Response instance

urlRedirectAction() 공개 메소드

By default, the response status code is 301. If the path is empty, the status code will be 410. If the permanent flag is set, the status code will be 302.
public urlRedirectAction ( string $path, boolean $permanent = false, boolean $scheme = null, integer $httpPort = 80, integer $httpsPort = 443 ) : Response
$path string The path to redirect to
$permanent boolean Whether the redirect is permanent or not
$scheme boolean The URL scheme (null to keep the current one)
$httpPort integer The HTTP port
$httpsPort integer The HTTPS port
리턴 Symfony\Component\HttpFoundation\Response A Response instance