Class Loader

Description

class to mimic codigniter's syntax for loading views from the controller

Located in /Loader.php (line 9)


	
			
Method Summary
void view (string $view_name, [type $data = null])
Methods
view (line 25)

Finds and displays the given view, and makes the values in $data available to it.

The name of the view is passed in without the leading "views/" directory or the trailing ".php" extension. So loading a view with $this->view("myview"); would look for a file called "views/myview.php"

the data is made available my taking the keys of $data, and assigning them to a locally scoped variable of the same name. array( 'title' => 'The Title' ) would be available in the view as $title.

  • access: public
void view (string $view_name, [type $data = null])
  • string $view_name: The name of the view to load
  • type $data: array of values to make available to the view

Documentation generated on Mon, 12 Mar 2012 11:50:14 -0700 by phpDocumentor 1.4.4