public function init($namespace) {
		// extract template path from class namespace
		$namespace = trim($namespace, '\\');
		$namespace_array = explode('\\', $namespace);
		$this->template_path = implode('/', array_slice($namespace_array, 1, 2));
		$this->template_path .= '/templates/';

		// get template name from template router
		$this->template = call_user_func(Factory::load('Config')->get('router.template'), $namespace);

		// pass the page variables to the template
		$this->setContent('page', Factory::load('Page')->get(), true);

		// cerate template compile path fron namespace array
		$module_name = implode('/', array_slice($namespace_array, 2, 1));
		$this->compile_path = STORAGE_PATH .'serpent_templates_compiled/' . $module_name . '/';
	}
public function init($namespace) {
		// extract template path from class namespace
		$namespace = trim($namespace, '\\');
		$namespace_array = explode('\\', $namespace);
		$this->template_path = implode('/', array_slice($namespace_array, 1, 2));
		$this->template_path .= '/templates/';

		// get template name from template router
		$this->template = call_user_func(Factory::load('Config')->get('router.template'), $namespace);

		// pass the page variables to the template
		$this->setContent('page', Factory::load('Page')->get(), true);

		// cerate template compile path fron namespace array
		$module_name = implode('/', array_slice($namespace_array, 2, 1));
		$this->compile_path = STORAGE_PATH .'serpent_templates_compiled/' . $module_name . '/';
	}
public function init ( $ namespace ) { // extract template path from class namespace $ namespace = trim ( $ namespace , '\\' ) ; $ namespace_array = explode ( '\\' , $ namespace ) ; $ this -> template_path = implode ( '/' , array_slice ( $ namespace_array , 1 , 2 ) ) ; $ this -> template_path .= '/templates/' ; // get template name from template router $ this -> template = call_user_func ( Factory :: load ( 'Config' ) -> get ( 'router.template' ) , $ namespace ) ; // pass the page variables to the template $ this -> setContent ( 'page' , Factory :: load ( 'Page' ) -> get ( ) , true ) ; // cerate template compile path fron namespace array $ module_name = implode ( '/' , array_slice ( $ namespace_array , 2 , 1 ) ) ; $ this -> compile_path = STORAGE_PATH . 'serpent_templates_compiled/' . $ module_name . '/' ; }
The view handler could extend this method to set some parameters.
@param  string  $namespace	The MVC controller class with namespace that inits this instance.
The view handler could extend this method to set some parameters .