OO newbie

Hi -

I think have been using CI to write procedural code in an MVC file system. I wondered if someone could verify if this is the case.

I have never had the need to set class level variables and setters and getters. I have never instantiated an object

$bar = new Foo($construct);

$stuff = $bar->whatever();

I have made a website which basically consists of links to functions. So if I were to run the above function I would just link it by doing something like http://mydomain/foo/whatever.

It would then interact with the model and do whatever I need to do.

Am I missing something here? I understand OO principles but have really never used them properly in PHP MVC.

Am I writing poor code?


Actually I do use classes in this way I just auto load them like $this->order->_getOrderDetail but still I have never used setters and getters!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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