|
Revision 21908, 1.0 kB
(checked in by fabien, 4 years ago)
|
[1.3] made some optimizations by replacing is_null() by null ===
|
- Property svn:mime-type set to
text/x-php
- 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 |
class sfPropelDataRetriever |
|---|
| 20 |
{ |
|---|
| 21 |
static public function retrieveObjects($class, $peerMethod = null, $criteria = null) |
|---|
| 22 |
{ |
|---|
| 23 |
if (!$peerMethod) |
|---|
| 24 |
{ |
|---|
| 25 |
$peerMethod = 'doSelect'; |
|---|
| 26 |
} |
|---|
| 27 |
|
|---|
| 28 |
$classPeer = constant($class.'::PEER'); |
|---|
| 29 |
|
|---|
| 30 |
if (!is_callable(array($classPeer, $peerMethod))) |
|---|
| 31 |
{ |
|---|
| 32 |
throw new sfException(sprintf('Peer method "%s" not found for class "%s"', $peerMethod, $classPeer)); |
|---|
| 33 |
} |
|---|
| 34 |
|
|---|
| 35 |
return call_user_func(array($classPeer, $peerMethod), null === $criteria ? new Criteria() : $criteria); |
|---|
| 36 |
} |
|---|
| 37 |
} |
|---|