public function loadDependenciesByReflectionMethod(ReflectionMethod $reflectionMethod)
    {

        // initialize the array for the dependencies
        $dependencies = array();

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getNamingDirectory()->search(
            sprintf('php:global/%s/%s', $this->getApplication()->getUniqueName(), ObjectManagerInterface::IDENTIFIER)
        );

        // iterate over the constructor parameters
        /** @var \AppserverIo\Lang\Reflection\ParameterInterface $reflectionParameter */
        foreach ($reflectionMethod->getParameters() as $reflectionParameter) {
            $dependencies[] = $this->get($objectManager->getPreference($reflectionParameter->getType()));
        }

        // return the initialized dependencies
        return $dependencies;
    }
public function loadDependenciesByReflectionMethod(ReflectionMethod $reflectionMethod)
    {

        // initialize the array for the dependencies
        $dependencies = array();

        // load the object manager instance
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getNamingDirectory()->search(
            sprintf('php:global/%s/%s', $this->getApplication()->getUniqueName(), ObjectManagerInterface::IDENTIFIER)
        );

        // iterate over the constructor parameters
        /** @var \AppserverIo\Lang\Reflection\ParameterInterface $reflectionParameter */
        foreach ($reflectionMethod->getParameters() as $reflectionParameter) {
            $dependencies[] = $this->get($objectManager->getPreference($reflectionParameter->getType()));
        }

        // return the initialized dependencies
        return $dependencies;
    }
public function loadDependenciesByReflectionMethod ( ReflectionMethod $ reflectionMethod ) { // initialize the array for the dependencies $ dependencies = array ( ) ; // load the object manager instance /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */ $ objectManager = $ this -> getNamingDirectory ( ) -> search ( sprintf ( 'php:global/%s/%s' , $ this -> getApplication ( ) -> getUniqueName ( ) , ObjectManagerInterface :: IDENTIFIER ) ) ; // iterate over the constructor parameters /** @var \AppserverIo\Lang\Reflection\ParameterInterface $reflectionParameter */ foreach ( $ reflectionMethod -> getParameters ( ) as $ reflectionParameter ) { $ dependencies [ ] = $ this -> get ( $ objectManager -> getPreference ( $ reflectionParameter -> getType ( ) ) ) ; } // return the initialized dependencies return $ dependencies ; }
Loads the dependencies for the passed reflection method.

@param \AppserverIo\Lang\Reflection\ReflectionMethod $reflectionMethod The reflection method to load the dependencies for

@return array The array with the initialized dependencies
Loads the dependencies for the passed reflection method .