Created
August 3, 2011 22:53
-
-
Save hamstar/1124052 to your computer and use it in GitHub Desktop.
Boilerplate structure for CI models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MY_Factory extends CI_Model { | |
public static function create() { | |
} | |
public static function find( $id ) { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MY_Model extends MY_Factory { | |
function __construct( $id ) { | |
self::find( $id ); | |
} | |
public static function delete( $id ) { | |
} | |
public static function save() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment