示例#1
0
 protected function getDefinitionClassMap(Definition\DefinitionInterface $definition)
 {
     $definitionClasses = $definition->getClasses();
     if (empty($definitionClasses)) {
         return array();
     }
     return array_combine(array_values($definitionClasses), array_fill(0, count($definitionClasses), $definition));
 }
示例#2
0
 /**
  * @param \Zend\Di\Definition\DefinitionInterface $definition
  * @param string                                  $class
  */
 protected function renderClassDefinition($definition, $class)
 {
     echo PHP_EOL . '    Parameters For Class: ' . $class . PHP_EOL;
     foreach ($definition->getMethods($class) as $methodName => $methodIsRequired) {
         foreach ($definition->getMethodParameters($class, $methodName) as $fqName => $pData) {
             echo '      ' . $pData[0] . ' [type: ';
             echo $pData[1] ? $pData[1] : 'scalar';
             echo $pData[2] === true && $methodIsRequired ? ', required' : ', not required';
             echo ', injection-method: ' . $methodName;
             echo ' fq-name: ' . $fqName;
             echo ']' . PHP_EOL;
         }
     }
     echo PHP_EOL;
 }