Interface RoutableInterface
Defines an object as routable.
Routable objects are accessible via a URI. The interface provides a "slug" property
to track the latest "pretty" URI path.
Available implementation as trait:
- Charcoal\Object\RoutableTrait
.
Methods summary
public
Charcoal\Object\RoutableInterface
|
#
setSlugPattern( mixed $pattern )
Set the object's URL slug pattern.
Set the object's URL slug pattern.
Parameters
- $pattern
- The slug pattern.
Returns
|
public
string|null
|
#
slugPattern( )
Retrieve the object's URL slug pattern.
Retrieve the object's URL slug pattern.
Returns
string|null
|
public
Charcoal\Object\RoutableInterface
|
#
setSlug( mixed $slug )
Set the object's URL slug.
Set the object's URL slug.
Parameters
Returns
|
public
string|null
|
#
slug( )
Retrieve the object's URL slug.
Retrieve the object's URL slug.
Returns
string|null
|
public
string|null
|
#
generateSlug( )
Generate a URL slug from the object's URL slug pattern.
Generate a URL slug from the object's URL slug pattern.
Returns
string|null
|
public
string|null
|
#
url( )
Retrieve the object's URI.
Retrieve the object's URI.
Returns
string|null
|
public
Charcoal\Object\ObjectRouteInterface
|
|
public
string
|
#
objectRouteClass( )
Retrieve the class name of the object route model.
Retrieve the class name of the object route model.
Returns
string
|