src/Container.php
protected function getReflectionMethod($className, $methodName = '__construct') {
		if (isset($this->reflectionMethods[$className])
			&& array_key_exists($methodName, $this->reflectionMethods[$className])
		) {
			return $this->reflectionMethods[$className][$methodName];
		}

		try {
			$reflectionClass = $this->getReflectionClass($className);
			if ($methodName === '__construct') {
				$reflectionMethod = $reflectionClass->getConstructor();
			} else {
				$reflectionMethod = $reflectionClass->getMethod($methodName);
			}
			$this->reflectionMethods[$className][$methodName] = $reflectionMethod;
		} catch (ReflectionException $e) {
			throw new NotFoundException("Method $className::$methodName is not found");
		}

		return $reflectionMethod;
	}
protected function getReflectionMethod($className, $methodName = '__construct') {
		if (isset($this->reflectionMethods[$className])
			&& array_key_exists($methodName, $this->reflectionMethods[$className])
		) {
			return $this->reflectionMethods[$className][$methodName];
		}

		try {
			$reflectionClass = $this->getReflectionClass($className);
			if ($methodName === '__construct') {
				$reflectionMethod = $reflectionClass->getConstructor();
			} else {
				$reflectionMethod = $reflectionClass->getMethod($methodName);
			}
			$this->reflectionMethods[$className][$methodName] = $reflectionMethod;
		} catch (ReflectionException $e) {
			throw new NotFoundException("Method $className::$methodName is not found");
		}

		return $reflectionMethod;
	}
protected function getReflectionMethod ( $ className , $ methodName = '__construct' ) { if ( isset ( $ this -> reflectionMethods [ $ className ] ) && array_key_exists ( $ methodName , $ this -> reflectionMethods [ $ className ] ) ) { return $ this -> reflectionMethods [ $ className ] [ $ methodName ] ; } try { $ reflectionClass = $ this -> getReflectionClass ( $ className ) ; if ( $ methodName === '__construct' ) { $ reflectionMethod = $ reflectionClass -> getConstructor ( ) ; } else { $ reflectionMethod = $ reflectionClass -> getMethod ( $ methodName ) ; } $ this -> reflectionMethods [ $ className ] [ $ methodName ] = $ reflectionMethod ; } catch ( ReflectionException $ e ) { throw new NotFoundException ( "Method $className::$methodName is not found" ) ; } return $ reflectionMethod ; }
Create and cache a ReflectionMethod.

@param string $className
@param string $methodName
@return \ReflectionMethod
Create and cache a ReflectionMethod .