controller in CI - 2.0? |
[eluser]anna16[/eluser]
Hi guys I'm really new to CI 2.0 Okay i noticed that when you define a class model you do it like the code below, Code: class Blog_model extends CI_Model I just want to know if this is also apply in the controller class, like the codes below, Code: class membership extends CI_Controller Please correct me if I'm wrong. Thank in advanced.
[eluser]InsiteFX[/eluser]
Hi anna, Yes, that is the correct way to do it. Your Controller will look like this: Code: class Blog extends CI_Controller { InsiteFX
[eluser]stormbytes[/eluser]
Dont forget that (with Controllers) constructors look like this: Code: function __construct() If you're dabbling in Ci2, which very much RocKs btw... You probably want to read Phil Sturgeon's post on migrating to Ci2. It can be had here: http://philsturgeon.co.uk/news/2010/05/u...gniter-2.0
|
Welcome Guest, Not a member yet? Register Sign In |