• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MVC Best Practices

#5
[eluser]wiredesignz[/eluser]
Hi darkhouse, Welcome to CI forums.

You could also use the MY_Controller extension to manage your alerts and then extend your own Controllers from this.

Code:
class MY_Controller extends Controller
{
    public function __construct()
    {
        parent::__construct();

        $this->load->library('alerts');

        $this->load->vars($this->alerts->get_alerts());  // extracts alerts into view buffer
    }
}

class Page_Controller extends MY_Controller
{
    public function __construct() {}
}


Messages In This Thread
MVC Best Practices - by El Forum - 08-19-2008, 01:40 PM
MVC Best Practices - by El Forum - 08-19-2008, 01:45 PM
MVC Best Practices - by El Forum - 08-19-2008, 01:50 PM
MVC Best Practices - by El Forum - 08-19-2008, 01:51 PM
MVC Best Practices - by El Forum - 08-19-2008, 03:50 PM
MVC Best Practices - by El Forum - 08-20-2008, 06:13 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.