SYSPATH/classes/kohana/view.php [ 215 ]
210 */
211 public function set_filename($file)
212 {
213 if (($path = Kohana::find_file('views', $file)) === FALSE)
214 {
215 throw new Kohana_View_Exception('The requested view :file could not be found', array(
216 ':file' => $file,
217 ));
218 }
219
220 // Store the file path locally
-
SYSPATH/classes/kohana/view.php [ 115 ]
»
Kohana_View->set_filename(arguments)
110 */
111 public function __construct($file = NULL, array $data = NULL)
112 {
113 if ($file !== NULL)
114 {
115 $this->set_filename($file);
116 }
117
118 if ( $data !== NULL)
119 {
120 // Add the values to the current data
-
SYSPATH/classes/kohana/view.php [ 26 ]
»
Kohana_View->__construct(arguments)
file |
string(4) "site" |
data |
NULL |
21 * @param array array of values
22 * @return View
23 */
24 public static function factory($file = NULL, array $data = NULL)
25 {
26 return new View($file, $data);
27 }
28
29 /**
30 * Captures the output that is generated when a view is included.
31 * The view data will be extracted to make local variables. This method
-
SYSPATH/classes/kohana/controller/template.php [ 32 ]
»
Kohana_View::factory(arguments)
27 public function before()
28 {
29 if ($this->auto_render === TRUE)
30 {
31 // Load the template
32 $this->template = View::factory($this->template);
33 }
34 }
35
36 /**
37 * Assigns the template as the request response.
-
{PHP internal call}
»
Kohana_Controller_Template->before()
-
SYSPATH/classes/kohana/request.php [ 840 ]
»
ReflectionMethod->invoke(arguments)
object |
object Controller_Hello(3) {
public template => string(4) "site"
public auto_render => bool TRUE
public request => object Request(9) {
public route => object Route(4) {
protected _uri => string(32) "(<controller>(/<action>(/<id>)))"
protected _regex => array(0)
protected _defaults => array(2) (
"controller" => string(7) "welcome"
"action" => string(5) "index"
)
protected _route_regex => string(87) "#^(?:(?P<controller>[^/.,;?]++)(?:/(?P<action>[^/.,;?]++)(?:/(?P<id>[^/.,;?]++))?)?)?$#"
}
public status => integer 500
public response => string(0) ""
public headers => array(1) (
"Content-Type" => string(24) "text/html; charset=utf-8"
)
public directory => string(0) ""
public controller => string(5) "hello"
public action => string(5) "index"
public uri => string(5) "hello"
protected _params => array(0)
}
} |
835
836 // Create a new instance of the controller
837 $controller = $class->newInstance($this);
838
839 // Execute the "before action" method
840 $class->getMethod('before')->invoke($controller);
841
842 // Determine the action to use
843 $action = empty($this->action) ? Route::$default_action : $this->action;
844
845 // Execute the main action with the parameters
-
APPPATH/bootstrap.php [ 76 ]
»
Kohana_Request->execute()
71 /**
72 * Execute the main request. A source of the URI can be passed, eg: $_SERVER['PATH_INFO'].
73 * If no source is specified, the URI will be automatically detected.
74 */
75 echo Request::instance()
76 ->execute()
77 ->send_headers()
78 ->response;
-
DOCROOT/index.php [ 106 ]
»
require(arguments)
0 |
string(49) "/var/www/kohana/testing/application/bootstrap.php" |
101 // Load empty core extension
102 require SYSPATH.'classes/kohana'.EXT;
103 }
104
105 // Bootstrap the application
106 require APPPATH.'bootstrap'.EXT;