I'm new to OOP.
I would like to have these different methods (page, menu, widget) under render functions. They are all in MY_Controller.php
class. Can you show me an example how to implement this? Just like the built in $this->parser->parse();
I want to create something similar...
public function render('something')
{
// page() related stuff;
// menu() related stuff;
// widget() related stuff;
}
$this->render->page('something');
$this->render->menu('something');
$this->render->widget('something');
Is this even possible? I know how to create $this->render_page();
or $this->render_widget();
and so on but I think the previous way is more feasible and good for the eyes, some more can group them together for easy maintenance. Do I need to do that way or just simply create different functions?