PHP 클래스 eZ\Publish\Core\MVC\Symfony\Routing\UrlAliasRouter

상속: implements Symfony\Cmf\Component\Routing\ChainedRouterInterface, implements Symfony\Component\Routing\Matcher\RequestMatcherInterface
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$contentService eZ\Publish\API\Repository\ContentService
$generator eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator
$locationService eZ\Publish\API\Repository\LocationService
$logger Psr\Log\LoggerInterface
$requestContext Symfony\Component\Routing\RequestContext
$rootLocationId integer | string Holds current root Location id.
$urlAliasService eZ\Publish\API\Repository\URLAliasService

공개 메소드들

메소드 설명
__construct ( eZ\Publish\API\Repository\LocationService $locationService, eZ\Publish\API\Repository\URLAliasService $urlAliasService, eZ\Publish\API\Repository\ContentService $contentService, UrlAliasGenerator $generator, Symfony\Component\Routing\RequestContext $requestContext, Psr\Log\LoggerInterface $logger = null )
generate ( string | eZ\Publish\API\Repository\Values\Content\Location $name, mixed $parameters = [], integer $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ) : string Generates a URL for a location, from the given parameters.
getContext ( )
getRouteCollection ( ) : RouteCollection Gets the RouteCollection instance associated with this Router.
getRouteDebugMessage ( $name, array $parameters = [] )
match ( $pathinfo ) Not supported. Please use matchRequest() instead.
matchRequest ( Request $request ) : array Tries to match a request with a set of routes.
setContext ( Symfony\Component\Routing\RequestContext $context )
setRootLocationId ( integer | string $rootLocationId ) Injects current root Location id.
supports ( mixed $name ) : boolean Whether the router supports the thing in $name to generate a route.

보호된 메소드들

메소드 설명
getUrlAlias ( $pathinfo ) : eZ\Publish\API\Repository\Values\Content\URLAlias Returns the UrlAlias object to use, starting from the request.
needsCaseRedirect ( eZ\Publish\API\Repository\Values\Content\URLAlias $loadedUrlAlias, string $requestedPath, string $pathPrefix ) : boolean Returns true of false on comparing $urlAlias->path and $path with case sensitivity.
removePathPrefix ( string $path, string $prefix ) : string Removes prefix from path.

메소드 상세

__construct() 공개 메소드

public __construct ( eZ\Publish\API\Repository\LocationService $locationService, eZ\Publish\API\Repository\URLAliasService $urlAliasService, eZ\Publish\API\Repository\ContentService $contentService, UrlAliasGenerator $generator, Symfony\Component\Routing\RequestContext $requestContext, Psr\Log\LoggerInterface $logger = null )
$locationService eZ\Publish\API\Repository\LocationService
$urlAliasService eZ\Publish\API\Repository\URLAliasService
$contentService eZ\Publish\API\Repository\ContentService
$generator eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator
$requestContext Symfony\Component\Routing\RequestContext
$logger Psr\Log\LoggerInterface

generate() 공개 메소드

It is possible to directly pass a Location object as the route name, as the ChainRouter allows it through ChainedRouterInterface. If $name is a route name, the "location" key in $parameters must be set to a valid eZ\Publish\API\Repository\Values\Content\Location object. "locationId" can also be provided. If the generator is not able to generate the url, it must throw the RouteNotFoundException as documented below.
또한 보기: UrlAliasRouter::supports()
public generate ( string | eZ\Publish\API\Repository\Values\Content\Location $name, mixed $parameters = [], integer $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ) : string
$name string | eZ\Publish\API\Repository\Values\Content\Location The name of the route or a Location instance
$parameters mixed An array of parameters
$referenceType integer The type of reference to be generated (one of the constants)
리턴 string The generated URL

getContext() 공개 메소드

public getContext ( )

getRouteCollection() 공개 메소드

Gets the RouteCollection instance associated with this Router.
public getRouteCollection ( ) : RouteCollection
리턴 Symfony\Component\Routing\RouteCollection A RouteCollection instance

getRouteDebugMessage() 공개 메소드

또한 보기: Symfony\Cmf\Component\Routing\VersatileGeneratorInterface::getRouteDebugMessage()
public getRouteDebugMessage ( $name, array $parameters = [] )
$parameters array

getUrlAlias() 보호된 메소드

Returns the UrlAlias object to use, starting from the request.
protected getUrlAlias ( $pathinfo ) : eZ\Publish\API\Repository\Values\Content\URLAlias
$pathinfo
리턴 eZ\Publish\API\Repository\Values\Content\URLAlias

match() 공개 메소드

Not supported. Please use matchRequest() instead.
public match ( $pathinfo )
$pathinfo

matchRequest() 공개 메소드

If the matcher can not find information, it must throw one of the exceptions documented below.
public matchRequest ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request The request to match
리턴 array An array of parameters

needsCaseRedirect() 보호된 메소드

Used to determine if redirect is needed because requested path is case-different from the stored one.
protected needsCaseRedirect ( eZ\Publish\API\Repository\Values\Content\URLAlias $loadedUrlAlias, string $requestedPath, string $pathPrefix ) : boolean
$loadedUrlAlias eZ\Publish\API\Repository\Values\Content\URLAlias
$requestedPath string
$pathPrefix string
리턴 boolean

removePathPrefix() 보호된 메소드

Checks for presence of $prefix and removes it from $path if found.
protected removePathPrefix ( string $path, string $prefix ) : string
$path string
$prefix string
리턴 string

setContext() 공개 메소드

public setContext ( Symfony\Component\Routing\RequestContext $context )
$context Symfony\Component\Routing\RequestContext

setRootLocationId() 공개 메소드

Injects current root Location id.
public setRootLocationId ( integer | string $rootLocationId )
$rootLocationId integer | string

supports() 공개 메소드

This check does not need to look if the specific instance can be resolved to a route, only whether the router can generate routes from objects of this class.
public supports ( mixed $name ) : boolean
$name mixed The route name or route object
리턴 boolean

프로퍼티 상세

$contentService 보호되어 있는 프로퍼티

protected ContentService,eZ\Publish\API\Repository $contentService
리턴 eZ\Publish\API\Repository\ContentService

$generator 보호되어 있는 프로퍼티

protected UrlAliasGenerator,eZ\Publish\Core\MVC\Symfony\Routing\Generator $generator
리턴 eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator

$locationService 보호되어 있는 프로퍼티

protected LocationService,eZ\Publish\API\Repository $locationService
리턴 eZ\Publish\API\Repository\LocationService

$logger 보호되어 있는 프로퍼티

protected LoggerInterface,Psr\Log $logger
리턴 Psr\Log\LoggerInterface

$requestContext 보호되어 있는 프로퍼티

protected RequestContext,Symfony\Component\Routing $requestContext
리턴 Symfony\Component\Routing\RequestContext

$rootLocationId 보호되어 있는 프로퍼티

Holds current root Location id.
protected int|string $rootLocationId
리턴 integer | string

$urlAliasService 보호되어 있는 프로퍼티

protected URLAliasService,eZ\Publish\API\Repository $urlAliasService
리턴 eZ\Publish\API\Repository\URLAliasService