Welcome Guest, Not a member yet? Register   Sign In
Implementing a factory pattern in the Model Layer of CI
#2

[eluser]titoneo[/eluser]
Class product as "product.php" in Model folder...

Code:
class Product extends Model
{
....function setName();
....function getName();
....function setPrice();
....function getPrice();

}

Class Shop1Product as "shop1product .php" in Model folder...

Code:
require_once("product.php");

class Shop1Product extends Product{


}

in the controller...

Code:
$this->load->model("shop1product");


Messages In This Thread
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-14-2010, 01:45 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-14-2010, 05:03 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-14-2010, 06:21 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-14-2010, 06:45 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-14-2010, 06:45 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-14-2010, 06:52 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 07-16-2010, 12:44 AM
Implementing a factory pattern in the Model Layer of CI - by El Forum - 08-05-2010, 10:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB