Skip to content

Instantly share code, notes, and snippets.

View anwarishak's full-sized avatar

Anwar Ishak anwarishak

View GitHub Profile
@anwarishak
anwarishak / model.php
Created April 30, 2012 14:33
Abstract "model" class in a custom PHP MVC framework - also forms the basis of the framework's ORM
<?php
/**
* Abstract class that serves as the Model in the MVC framework.
*
* A Model is a representation of the information in the application. A Model's
* data is saved in the database and the class is used to handle all the
* business logics. This class handles the standard create, read, update
* and delete operations. It must be extended to create the concrete
* implementation of a Model, and handle any other business logics specific to
Hello, @1000heads!