pclib
3.0.0
Lightweight PHP framework
|
Translates URL to instance of Action class. More...
Public Member Functions | |
getAction () | |
Create Action from current request. More... | |
addRedirect ($old, $new, $code=302) | |
Set route to be redirected. More... | |
followRedirects () | |
Redirect old route to new route, if it was added by addRedirect(). | |
redirect ($route, $code=null) | |
Redirect to $route or url. | |
createUrl ($s) | |
Transform internal action (for example 'products/edit/id:1') to URL. More... | |
Public Member Functions inherited from BaseObject | |
loadDefaults ($className=null) | |
Load default parameters of class $className into object instance. | |
setProperties (array $defaults) | |
Set public properties of object from the array. More... | |
toArray () | |
Convert object to array. More... | |
Data Fields | |
$friendlyUrl = false | |
Create friendly URL? | |
$action | |
var Action Current Action | |
$index = '' | |
var index Default index page - for example 'index-dev.php' | |
Data Fields inherited from BaseObject | |
$serviceLocator | |
var function() Return service object when requested with service(). | |
Additional Inherited Members | |
Static Public Member Functions inherited from BaseObject | |
static | defaults () |
Set or retireve default parameters of the object. More... | |
Protected Member Functions inherited from BaseObject | |
service ($service, $default=null) | |
Try acquire $service and load it into property $this->$service. More... | |
Translates URL to instance of Action class.
Action contains class and method name (with parameters) which will be called.
addRedirect | ( | $old, | |
$new, | |||
$code = 302 |
|||
) |
Set route to be redirected.
string | $old | Old route |
string | $new | New route |
string | $code | HTTP status code: 302 temporary | 301 permanent |
createUrl | ( | $s | ) |
Transform internal action (for example 'products/edit/id:1') to URL.
string | Action | $s |
getAction | ( | ) |