|
Revision 23810, 1.1 kB
(checked in by Kris.Wallsmith, 4 years ago)
|
[1.3] set svn:eol-style property to native and svn:keywords property to Id on all .php files
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
class sfDoctrineDataRetriever |
|---|
| 23 |
{ |
|---|
| 24 |
|
|---|
| 25 |
* Used internally by symfony for retrieving objects for selector helper options. |
|---|
| 26 |
* |
|---|
| 27 |
* @param string $model Name of the model to retrieve the objects from. |
|---|
| 28 |
* @param string $peerMethod Name of the peer method to invoke on the Doctrine_Table instance for the model. |
|---|
| 29 |
*/ |
|---|
| 30 |
static public function retrieveObjects($class, $peerMethod = 'findAll') |
|---|
| 31 |
{ |
|---|
| 32 |
if (!$peerMethod) |
|---|
| 33 |
{ |
|---|
| 34 |
$peerMethod = 'findAll'; |
|---|
| 35 |
} |
|---|
| 36 |
|
|---|
| 37 |
$table = Doctrine_Core::getTable($class); |
|---|
| 38 |
|
|---|
| 39 |
return call_user_func(array($table, $peerMethod)); |
|---|
| 40 |
} |
|---|
| 41 |
} |
|---|