PHP 클래스 Neos\Flow\Mvc\Routing\UriBuilder

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$addQueryString boolean
$arguments array
$argumentsToBeExcludedFromQueryString array
$createAbsoluteUri boolean
$createRelativePaths boolean
$environment Neos\Flow\Utility\Environment
$format string
$lastArguments array Arguments which have been used for building the last URI
$request Neos\Flow\Mvc\ActionRequest
$router Neos\Flow\Mvc\Routing\RouterInterface
$section string

공개 메소드들

메소드 설명
build ( array $arguments = [] ) : string Builds the URI
getAddQueryString ( ) : boolean
getArguments ( ) : array
getArgumentsToBeExcludedFromQueryString ( ) : array
getCreateAbsoluteUri ( ) : boolean
getCreateRelativePaths ( ) : boolean
getFormat ( ) : string
getLastArguments ( ) : array Returns the arguments being used for the last URI being built.
getRequest ( ) : ActionRequest Gets the current request
getSection ( ) : string
reset ( ) : UriBuilder Resets all UriBuilder options to their default value.
setAddQueryString ( boolean $addQueryString ) : UriBuilder If set, the current query parameters will be merged with $this->arguments. Defaults to FALSE.
setArguments ( array $arguments ) : UriBuilder Additional query parameters.
setArgumentsToBeExcludedFromQueryString ( array $argumentsToBeExcludedFromQueryString ) : UriBuilder A list of arguments to be excluded from the query parameters Only active if addQueryString is set
setCreateAbsoluteUri ( boolean $createAbsoluteUri ) : UriBuilder If set, the URI is prepended with the current base URI. Defaults to FALSE.
setCreateRelativePaths ( boolean $createRelativePaths ) : UriBuilder By default relative URIs are prefixed with the current script request path creating absolute paths starting with a slash If this is set to FALSE, relative paths are created as it used to be the default behavior before Flow 2.0.
setFormat ( string $format ) : UriBuilder Specifies the format of the target (e.g. "html" or "xml")
setRequest ( ActionRequest $request ) : void Sets the current request and resets the UriBuilder
setSection ( string $section ) : UriBuilder If specified, adds a given HTML anchor to the URI (#.
uriFor ( string $actionName, array $controllerArguments = [], string $controllerName = null, string $packageKey = null, string $subPackageKey = null ) : string Creates an URI used for linking to an Controller action.

보호된 메소드들

메소드 설명
addNamespaceToArguments ( array $arguments, Neos\Flow\Mvc\RequestInterface $currentRequest ) : array Adds the argument namespace of the current request to the specified arguments.
getRequestNamespacePath ( ActionRequest $request ) : string Get the path of the argument namespaces of all parent requests.
mergeArgumentsWithRequestArguments ( array $arguments ) : array Merges specified arguments with arguments from request.

메소드 상세

addNamespaceToArguments() 보호된 메소드

This happens recursively iterating through the nested requests in case of a subrequest. For example if this is executed inside a widget sub request in a plugin sub request, the result would be: array( 'pluginRequestNamespace' => array( 'widgetRequestNamespace => $arguments ) )
protected addNamespaceToArguments ( array $arguments, Neos\Flow\Mvc\RequestInterface $currentRequest ) : array
$arguments array arguments
$currentRequest Neos\Flow\Mvc\RequestInterface
리턴 array arguments with namespace

build() 공개 메소드

Builds the URI
public build ( array $arguments = [] ) : string
$arguments array optional URI arguments. Will be merged with $this->arguments with precedence to $arguments
리턴 string The URI

getAddQueryString() 공개 메소드

public getAddQueryString ( ) : boolean
리턴 boolean

getArguments() 공개 메소드

public getArguments ( ) : array
리턴 array

getArgumentsToBeExcludedFromQueryString() 공개 메소드

getCreateAbsoluteUri() 공개 메소드

public getCreateAbsoluteUri ( ) : boolean
리턴 boolean

getCreateRelativePaths() 공개 메소드

public getCreateRelativePaths ( ) : boolean
리턴 boolean

getFormat() 공개 메소드

public getFormat ( ) : string
리턴 string

getLastArguments() 공개 메소드

This is only set after build() / uriFor() has been called.
public getLastArguments ( ) : array
리턴 array The last arguments

getRequest() 공개 메소드

Gets the current request
public getRequest ( ) : ActionRequest
리턴 Neos\Flow\Mvc\ActionRequest

getRequestNamespacePath() 보호된 메소드

Example: mainrequest.subrequest.subsubrequest
protected getRequestNamespacePath ( ActionRequest $request ) : string
$request Neos\Flow\Mvc\ActionRequest
리턴 string

getSection() 공개 메소드

public getSection ( ) : string
리턴 string

mergeArgumentsWithRequestArguments() 보호된 메소드

If $this->request is no sub request, request arguments will only be merged if $this->addQueryString is set. Otherwise all request arguments except for the ones prefixed with the current request argument namespace will be merged. Additionally special arguments (PackageKey, SubpackageKey, ControllerName & Action) are merged. The argument provided through the $arguments parameter always overrule the request arguments. The request hierarchy is structured as follows: root (HTTP) > main (Action) > sub (Action) > sub sub (Action)
protected mergeArgumentsWithRequestArguments ( array $arguments ) : array
$arguments array
리턴 array

reset() 공개 메소드

Note: This won't reset the Request that is attached to this UriBuilder (@see setRequest())
public reset ( ) : UriBuilder
리턴 UriBuilder the current UriBuilder to allow method chaining

setAddQueryString() 공개 메소드

If set, the current query parameters will be merged with $this->arguments. Defaults to FALSE.
public setAddQueryString ( boolean $addQueryString ) : UriBuilder
$addQueryString boolean
리턴 UriBuilder the current UriBuilder to allow method chaining

setArguments() 공개 메소드

If you want to "prefix" arguments, you can pass in multidimensional arrays: array('prefix1' => array('foo' => 'bar')) gets "&prefix1[foo]=bar"
public setArguments ( array $arguments ) : UriBuilder
$arguments array
리턴 UriBuilder the current UriBuilder to allow method chaining

setArgumentsToBeExcludedFromQueryString() 공개 메소드

A list of arguments to be excluded from the query parameters Only active if addQueryString is set
public setArgumentsToBeExcludedFromQueryString ( array $argumentsToBeExcludedFromQueryString ) : UriBuilder
$argumentsToBeExcludedFromQueryString array
리턴 UriBuilder the current UriBuilder to allow method chaining

setCreateAbsoluteUri() 공개 메소드

If set, the URI is prepended with the current base URI. Defaults to FALSE.
public setCreateAbsoluteUri ( boolean $createAbsoluteUri ) : UriBuilder
$createAbsoluteUri boolean
리턴 UriBuilder the current UriBuilder to allow method chaining

setCreateRelativePaths() 공개 메소드

By default relative URIs are prefixed with the current script request path creating absolute paths starting with a slash If this is set to FALSE, relative paths are created as it used to be the default behavior before Flow 2.0.
public setCreateRelativePaths ( boolean $createRelativePaths ) : UriBuilder
$createRelativePaths boolean
리턴 UriBuilder the current UriBuilder to allow method chaining

setFormat() 공개 메소드

Specifies the format of the target (e.g. "html" or "xml")
public setFormat ( string $format ) : UriBuilder
$format string (e.g. "html" or "xml"), will be transformed to lowercase!
리턴 UriBuilder the current UriBuilder to allow method chaining

setRequest() 공개 메소드

Sets the current request and resets the UriBuilder
또한 보기: reset()
public setRequest ( ActionRequest $request ) : void
$request Neos\Flow\Mvc\ActionRequest
리턴 void

setSection() 공개 메소드

..)
public setSection ( string $section ) : UriBuilder
$section string
리턴 UriBuilder the current UriBuilder to allow method chaining

uriFor() 공개 메소드

Creates an URI used for linking to an Controller action.
또한 보기: build()
public uriFor ( string $actionName, array $controllerArguments = [], string $controllerName = null, string $packageKey = null, string $subPackageKey = null ) : string
$actionName string Name of the action to be called
$controllerArguments array Additional query parameters. Will be merged with $this->arguments.
$controllerName string Name of the target controller. If not set, current ControllerName is used.
$packageKey string Name of the target package. If not set, current Package is used.
$subPackageKey string Name of the target SubPackage. If not set, current SubPackage is used.
리턴 string the rendered URI

프로퍼티 상세

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

protected bool $addQueryString
리턴 boolean

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

protected array $arguments
리턴 array

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

protected array $argumentsToBeExcludedFromQueryString
리턴 array

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

protected bool $createAbsoluteUri
리턴 boolean

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

protected bool $createRelativePaths
리턴 boolean

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

protected Environment,Neos\Flow\Utility $environment
리턴 Neos\Flow\Utility\Environment

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

protected string $format
리턴 string

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

Arguments which have been used for building the last URI
protected array $lastArguments
리턴 array

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

protected ActionRequest,Neos\Flow\Mvc $request
리턴 Neos\Flow\Mvc\ActionRequest

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

protected RouterInterface,Neos\Flow\Mvc\Routing $router
리턴 Neos\Flow\Mvc\Routing\RouterInterface

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

protected string $section
리턴 string