PHP Класс Symfony\Bundle\FrameworkBundle\Controller\RedirectController

Автор: Fabien Potencier ([email protected])
Наследование: extends Symfony\Component\DependencyInjection\ContainerAware
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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