Created
February 2, 2010 20:08
-
-
Save simensen/292971 to your computer and use it in GitHub Desktop.
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 SomeModel extends Model { | |
function doSomething ($foo) { | |
// need to work with another model... | |
$CI =& get_instance(); | |
$CI->load->model('SomeOtherModel','NiceName',true); | |
// use $CI instead of $this to query the other models. Shorter anyway ;-) | |
$CI->NiceName->doSomethingElse(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment