eZPublishCommunityProject  2012.12
eZ\Publish\Core\SignalSlot\URLWildcardService Class Reference
+ Inheritance diagram for eZ\Publish\Core\SignalSlot\URLWildcardService:
+ Collaboration diagram for eZ\Publish\Core\SignalSlot\URLWildcardService:

Public Member Functions

 __construct (URLWildcardServiceInterface $service, SignalDispatcher $signalDispatcher)
 Constructor. More...
 
 create ($sourceUrl, $destinationUrl, $forward=false)
 Creates a new url wildcard. More...
 
 load ($id)
 Loads a url wild card. More...
 
 loadAll ($offset=0, $limit=-1)
 Loads all url wild card (paged) More...
 
 remove (URLWildcard $urlWildcard)
 removes an url wildcard More...
 
 translate ($url)
 translates an url to an existing uri resource based on the source/destination patterns of the url wildcard. More...
 

Protected Attributes

 $service
 
 $signalDispatcher
 

Constructor & Destructor Documentation

eZ\Publish\Core\SignalSlot\URLWildcardService::__construct ( URLWildcardServiceInterface  $service,
SignalDispatcher  $signalDispatcher 
)

Constructor.

Construct service object from aggregated service and signal dispatcher

Parameters
\eZ\Publish\API\Repository\URLWildcardService$service
\eZ\Publish\Core\SignalSlot\SignalDispatcher$signalDispatcher

Member Function Documentation

eZ\Publish\Core\SignalSlot\URLWildcardService::create (   $sourceUrl,
  $destinationUrl,
  $forward = false 
)

Creates a new url wildcard.

Exceptions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif the $sourceUrl pattern already exists
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to create url wildcards
\eZ\Publish\API\Repository\Exceptions\ContentValidationExceptionif the number of "*" patterns in $sourceUrl and the number of {} placeholders in $destinationUrl doesn't match or if the placeholders aren't a valid number sequence({1}/{2}/{3}), starting with 1.
Parameters
string$sourceUrl
string$destinationUrl
boolean$forward
Returns

Implements eZ\Publish\API\Repository\URLWildcardService.

eZ\Publish\Core\SignalSlot\URLWildcardService::load (   $id)

Loads a url wild card.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the url wild card was not found
Parameters
mixed$id
Returns

Implements eZ\Publish\API\Repository\URLWildcardService.

eZ\Publish\Core\SignalSlot\URLWildcardService::loadAll (   $offset = 0,
  $limit = -1 
)

Loads all url wild card (paged)

Parameters
int$offset
int$limit
Returns
[]

Implements eZ\Publish\API\Repository\URLWildcardService.

eZ\Publish\Core\SignalSlot\URLWildcardService::remove ( URLWildcard  $urlWildcard)

removes an url wildcard

Exceptions
\eZ\Publish\API\Repository\Exceptions\UnauthorizedExceptionif the user is not allowed to remove url wildcards
Parameters
\eZ\Publish\API\Repository\Values\Content\URLWildcard$urlWildcardthe url wildcard to remove

Implements eZ\Publish\API\Repository\URLWildcardService.

eZ\Publish\Core\SignalSlot\URLWildcardService::translate (   $url)

translates an url to an existing uri resource based on the source/destination patterns of the url wildcard.

If the resulting url is an alias it will be translated to the system uri.

This method runs also configured url translations and filter

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the url could not be translated
Parameters
mixed$url
Returns

Implements eZ\Publish\API\Repository\URLWildcardService.

Member Data Documentation

eZ\Publish\Core\SignalSlot\URLWildcardService::$service
protected
eZ\Publish\Core\SignalSlot\URLWildcardService::$signalDispatcher
protected

The documentation for this class was generated from the following file: