public function ObjectManagerDecoratorTest::getMethodParameters in Plug 7
File
- lib/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Persistence/ ObjectManagerDecoratorTest.php, line 27
Class
Namespace
Doctrine\Tests\Common\PersistenceCode
public function getMethodParameters() {
$class = new \ReflectionClass('Doctrine\\Common\\Persistence\\ObjectManager');
$methods = array();
foreach ($class
->getMethods() as $method) {
if ($method
->getNumberOfRequiredParameters() === 0) {
$methods[] = array(
$method
->getName(),
array(),
);
}
elseif ($method
->getNumberOfRequiredParameters() > 0) {
$methods[] = array(
$method
->getName(),
array_fill(0, $method
->getNumberOfRequiredParameters(), 'req') ?: array(),
);
}
if ($method
->getNumberOfParameters() != $method
->getNumberOfRequiredParameters()) {
$methods[] = array(
$method
->getName(),
array_fill(0, $method
->getNumberOfParameters(), 'all') ?: array(),
);
}
}
return $methods;
}