Welcome Guest, Not a member yet? Register   Sign In
How to use codeigniter and real OOP?
#3

[eluser]Phil Sturgeon[/eluser]
CodeIgniter libraries and models use the Singleton pattern, but of course you can still do this.

Model

Code:
class Employee {}

Controller

Code:
$this->load->model('employee');

$foo = new Employee;

It's only PHP remember Smile


Messages In This Thread
How to use codeigniter and real OOP? - by El Forum - 10-22-2010, 02:51 AM
How to use codeigniter and real OOP? - by El Forum - 10-22-2010, 03:51 AM
How to use codeigniter and real OOP? - by El Forum - 10-22-2010, 04:21 AM
How to use codeigniter and real OOP? - by El Forum - 06-11-2011, 09:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB