-
Notifications
You must be signed in to change notification settings - Fork 0
Variables
defvayne23 edited this page Jan 4, 2012
·
1 revision
$this->root;Full path to the website.
String
echo $this->root;
// Returns: /src/website/public_html/$this->controller;First part of the URL.
String
// URL to page is http://example.com/blog/post/1/
echo $this->controller;
// Returns: blog$this->action;Second part of the URL.
String
// URL to page is http://example.com/blog/post/1/
echo $this->action;
// Returns: post$this->url;Breakdown of the URL into an array.
Array
// URL to page is http://example.com/blog/post/1/
print_r($this->url);Will output:
Array
(
[0] => blog
[1] => post
[2] => 1
)
$this->param;Combination of parameters found in the route patterns.
Array
// URL to page is http://example.com/blog/post/1/
print_r($this->param);URL is setup as: (app/config/routes.php)
'/blog/post/<id:[0-9]+>/' => array(
'controller' => 'blog',
'action' => 'view',
'param' => array(
'type' => 'post'
)
)Will output:
Array
(
[type] => post
[id] => 1
)