protected function getParams(\ReflectionMethod $mirror, $single=false)
	{
		$params = [];

		foreach ($mirror->getParameters() as $param)
		{
			$alias = strtolower($param->name);

			// Is this a mapped alias?
			if (! empty($this->services[$alias]))
			{
				$params[] = $single ? $this->single($alias) : $this->make($alias);
				continue;
			}

			// Is this a normal class we can give them?
			$class = $param->getClass()->name;

			if (class_exists($class))
			{
				$params[] = new $class();
			}

			$params[] = null;
		}

		return $params;
	}
protected function getParams(\ReflectionMethod $mirror, $single=false)
	{
		$params = [];

		foreach ($mirror->getParameters() as $param)
		{
			$alias = strtolower($param->name);

			// Is this a mapped alias?
			if (! empty($this->services[$alias]))
			{
				$params[] = $single ? $this->single($alias) : $this->make($alias);
				continue;
			}

			// Is this a normal class we can give them?
			$class = $param->getClass()->name;

			if (class_exists($class))
			{
				$params[] = new $class();
			}

			$params[] = null;
		}

		return $params;
	}
protected function getParams ( \ ReflectionMethod $ mirror , $ single = false ) { $ params = [ ] ; foreach ( $ mirror -> getParameters ( ) as $ param ) { $ alias = strtolower ( $ param -> name ) ; // Is this a mapped alias? if ( ! empty ( $ this -> services [ $ alias ] ) ) { $ params [ ] = $ single ? $ this -> single ( $ alias ) : $ this -> make ( $ alias ) ; continue ; } // Is this a normal class we can give them? $ class = $ param -> getClass ( ) -> name ; if ( class_exists ( $ class ) ) { $ params [ ] = new $ class ( ) ; } $ params [ ] = null ; } return $ params ; }
Given a reflection method, will get or create an array of objects
ready to be inserted into the class' constructor.

If $single is true, will return a singleton version of dependencies
else will create a new class.

@param \ReflectionMethod $mirror
@param bool $single

@return array
Given a reflection method will get or create an array of objects ready to be inserted into the class constructor .