Components

render_component($options = array ())

7: 	function render_component($options = array ()) {
8: 		if ($options['controller'] != $this->controller) {
9: 			include DIR_CONTROLLERS . '/' . $options['controller'] . '_controller.php';
10: 			$class_name = ucwords($options['controller']) . 'Controller';
11: 			$controller = new $class_name;
12: 		} else {
13: 			$controller = $this;
14: 		}
15:
16: 		$this->controller = $options['controller'];
17: 		$controller->params = $options;
18:
19: 		ob_start();
20: 		call_user_func(array (
21: 			$controller,
22: 			$options['action']
23: 		));
24: 		$content = ob_get_contents();
25: 		ob_end_clean();
26: 		return $content;
27: 	}

File: lib/controller/Components.php, #line 7

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>