Created
February 14, 2014 16:32
-
-
Save bakertim/9004291 to your computer and use it in GitHub Desktop.
PHP: fix Paris missing find_many method
This file contains hidden or 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 | |
/** | |
* Wrap Idiorm's find_many method to return | |
* an instance of the class associated with | |
* this wrapper instead of the raw ORM class. | |
*/ | |
public function find_many() { | |
$items = parent::find_many(); | |
$result = array(); | |
foreach ($items as $item) { | |
$result[] = $this->_create_model_instance($item); | |
} | |
return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment