Methods summary
public
|
#
__construct( array $data )
Returns new template route object.
Returns new template route object.
Parameters
- $data
- Class depdendencies.
|
public
|
#
setDependencies( Pimple\Container $container )
Inject dependencies from a DI Container.
Inject dependencies from a DI Container.
Parameters
- $container
- A dependencies container instance.
|
public
boolean
|
#
pathResolvable( Pimple\Container $container )
Determine if the URI path resolves to an object.
Determine if the URI path resolves to an object.
Parameters
- $container
- A DI (Pimple) container.
Returns
boolean
|
public
Psr\Http\Message\ResponseInterface
|
#
__invoke( Pimple\Container $container, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response )
Resolve the dynamic route.
Resolve the dynamic route.
Parameters
- $container
- A DI (Pimple) container.
- $request
- A PSR-7 compatible Request instance.
- $response
- A PSR-7 compatible Response instance.
Returns
Psr\Http\Message\ResponseInterface
|
protected
Psr\Http\Message\ResponseInterface
|
#
resolveLatestObjectRoute( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response )
Parameters
- $request
- A PSR-7 compatible Request instance.
- $response
- A PSR-7 compatible Response instance.
Returns
Psr\Http\Message\ResponseInterface
|
protected
Charcoal\Cms\Route\GenericRoute
|
|
protected
string
|
#
createTemplate( Pimple\Container $container, Psr\Http\Message\RequestInterface $request )
Parameters
- $container
- A DI (Pimple) container.
- $request
- The request to intialize the template with.
Returns
string
|
public
Charcoal\Object\ObjectRouteInterface
|
#
createRouteObject( )
Create a route object.
Returns
Charcoal\Object\ObjectRouteInterface
|
protected
Charcoal\Cms\Route\GenericRoute
|
#
setObjectRouteClass( string $className )
Set the class name of the object route model.
Set the class name of the object route model.
Parameters
- $className
- The class name of the object route model.
Returns
Throws
InvalidArgumentException If the class name is not a string.
|
public
string
|
#
objectRouteClass( )
Retrieve the class name of the object route model.
Retrieve the class name of the object route model.
Returns
string
|
protected
Charcoal\Object\RoutableInterface
|
#
loadContextObject( )
Load the object associated with the matching object route.
Load the object associated with the matching object route.
Validating if the object ID exists is delegated to the
GenericRoute Chainable::pathResolvable() method.
Returns
Charcoal\Object\RoutableInterface
|
protected
Charcoal\Object\ObjectRouteInterface
|
#
loadObjectRouteFromPath( )
Load the object route matching the URI path.
Load the object route matching the URI path.
Returns
Charcoal\Object\ObjectRouteInterface
|
public
Charcoal\Object\ObjectRouteInterface
|
#
getLatestObjectPathHistory( Charcoal\Object\ObjectRouteInterface $route )
Retrieve the latest object route from the given object route's
associated object.
Retrieve the latest object route from the given object route's
associated object.
The object routes are ordered by descending creation date (latest first).
Should never MISS, the given object route should exist.
Parameters
Returns
Charcoal\Object\ObjectRouteInterface
|
protected
Charcoal\Cms\Route\GenericRoute
|
#
setPath( string $path )
Set the specified URI path.
Set the specified URI path.
Parameters
- $path
- The path to use for route resolution.
Returns
|
protected
Charcoal\Cms\Route\GenericRoute
|
#
setModelFactory( Charcoal\Factory\FactoryInterface $factory )
Set an object model factory.
Set an object model factory.
Parameters
- $factory
- The model factory, to create objects.
Returns
|
public
Charcoal\Cms\Route\GenericRoute
|
#
setCollectionLoader( Charcoal\Loader\CollectionLoader $loader )
Set a model collection loader.
Set a model collection loader.
Parameters
- $loader
- The collection loader.
Returns
|
protected
|
#
setLocale( string $langCode )
Sets the environment's current locale.
Sets the environment's current locale.
Parameters
- $langCode
- The locale's language code.
|
protected
string
|
#
path( )
Retrieve the URI path.
Returns
string
|
public
Charcoal\Factory\FactoryInterface
|
#
modelFactory( )
Retrieve the object model factory.
Retrieve the object model factory.
Returns
Charcoal\Factory\FactoryInterface
Throws
RuntimeException If the model factory was not previously set.
|
protected
Charcoal\Loader\CollectionLoader
|
#
collectionLoader( )
Retrieve the model collection loader.
Retrieve the model collection loader.
Returns
Charcoal\Loader\CollectionLoader
Throws
RuntimeException If the collection loader was not previously set.
|
protected
boolean
|
|
protected
integer
|
|
protected
string
|
|