class ResourceRegistrar (View source)

Methods

void
__construct( Router $router)

Create a new resource registrar instance.

void
register( string $name, string $controller, array $options = array())

Route a resource to a controller.

string
getResourceUri( string $resource)

Get the base resource URI for a given resource.

string
getResourceWildcard( string $value)

Format a resource parameter for usage.

static  void
singularParameters($singular = true)

Set or unset the unmapped global parameters to singular.

static  array
getParameters()

Get the global parameter map.

static  void
setParameters( array $parameters = array())

Set the global parameter mapping.

Details

at line line 50
void __construct( Router $router)

Create a new resource registrar instance.

Parameters

Router $router

Return Value

void

at line line 63
void register( string $name, string $controller, array $options = array())

Route a resource to a controller.

Parameters

string $name
string $controller
array $options

Return Value

void

at line line 154
string getResourceUri( string $resource)

Get the base resource URI for a given resource.

Parameters

string $resource

Return Value

string

at line line 254
string getResourceWildcard( string $value)

Format a resource parameter for usage.

Parameters

string $value

Return Value

string

at line line 398
static void singularParameters($singular = true)

Set or unset the unmapped global parameters to singular.

Parameters

$singular

Return Value

void

at line line 408
static array getParameters()

Get the global parameter map.

Return Value

array

at line line 419
static void setParameters( array $parameters = array())

Set the global parameter mapping.

Parameters

array $parameters

Return Value

void