public function getMethod($classNameOrInstance, $methodName)
    {
        $className = is_string($classNameOrInstance)
            ? $classNameOrInstance
            : get_class($classNameOrInstance);

        $cacheKey = self::CACHE_KEY_METHODS . strtolower($className) . '.' . strtolower($methodName);

        if (! $reflectedMethod = $this->cache->fetch($cacheKey)) {
            $reflectedMethod = new ReflectionMethod($className, $methodName);
            $this->cache->store($cacheKey, $reflectedMethod);
        }

        return $reflectedMethod;
    }
public function getMethod($classNameOrInstance, $methodName)
    {
        $className = is_string($classNameOrInstance)
            ? $classNameOrInstance
            : get_class($classNameOrInstance);

        $cacheKey = self::CACHE_KEY_METHODS . strtolower($className) . '.' . strtolower($methodName);

        if (! $reflectedMethod = $this->cache->fetch($cacheKey)) {
            $reflectedMethod = new ReflectionMethod($className, $methodName);
            $this->cache->store($cacheKey, $reflectedMethod);
        }

        return $reflectedMethod;
    }
public function getMethod ( $ classNameOrInstance , $ methodName ) { $ className = is_string ( $ classNameOrInstance ) ? $ classNameOrInstance : get_class ( $ classNameOrInstance ) ; $ cacheKey = self :: CACHE_KEY_METHODS . strtolower ( $ className ) . '.' . strtolower ( $ methodName ) ; if ( ! $ reflectedMethod = $ this -> cache -> fetch ( $ cacheKey ) ) { $ reflectedMethod = new ReflectionMethod ( $ className , $ methodName ) ; $ this -> cache -> store ( $ cacheKey , $ reflectedMethod ) ; } return $ reflectedMethod ; }
Retrieves and caches a reflection for the specified class method.

@since 0.3.0

@param string|object $classNameOrInstance Class name or instance the method is referring to.
@param string        $methodName          Name of the method to get the reflection for.

@return ReflectionMethod ReflectionMethod object for the specified method.
Retrieves and caches a reflection for the specified class method .