private function _reflectSolveClassHierarchy()
    {
        if (!empty($this->_classHierarchy)) {
            throw new BadPropertyMapException('Detected multiple calls to _reflectSolveClassHierarchy().');
        }

        try {
            // Begin reflecting the "solve-class". And completely refuse to
            // proceed if the class name we were asked to solve doesn't match
            // its EXACT real name. It's just a nice bonus check for safety,
            // to ensure that our caller will be able to find their expected
            // result in the correct cache key later.
            $reflector = new ReflectionClass($this->_strictSolveClassName);
            if ($this->_solveClassName !== $reflector->getName()) {
                throw new BadPropertyMapException(sprintf(
                    'Unable to compile class "%s" due to mismatched class name parameter value (the real class name is: "%s").',
                    $this->_strictSolveClassName, Utilities::createStrictClassPath($reflector->getName())
                ));
            }

            // Now resolve all classes in its inheritance ("extends") chain.
            do {
                // Store the class in the hierarchy.
                // NOTE: The key is VERY important because it's used later when
                // checking if a specific class exists in the current hierarchy.
                $this->_classHierarchy[$reflector->getName()] = [
                    'reflector'       => $reflector,
                    'namespace'       => $reflector->getNamespaceName(),
                    'className'       => $reflector->getName(), // Includes namespace.
                    'strictClassName' => Utilities::createStrictClassPath($reflector->getName()),
                ];

                // Update the reflector variable to point at the next parent
                // class in its hierarchy (or false if no more exists).
                $reflector = $reflector->getParentClass();
            } while ($reflector !== false);

            // Reverse the list to fix the order, since we built it "bottom-up".
            $this->_classHierarchy = array_reverse($this->_classHierarchy, true);
        } catch (ReflectionException $e) {
            // This should only be able to fail if the classname was invalid.
            throw new BadPropertyMapException(sprintf(
                'Reflection of class hierarchy failed for class "%s". Reason: "%s".',
                $this->_strictSolveClassName, $e->getMessage()
            ));
        }
    }
private function _reflectSolveClassHierarchy()
    {
        if (!empty($this->_classHierarchy)) {
            throw new BadPropertyMapException('Detected multiple calls to _reflectSolveClassHierarchy().');
        }

        try {
            // Begin reflecting the "solve-class". And completely refuse to
            // proceed if the class name we were asked to solve doesn't match
            // its EXACT real name. It's just a nice bonus check for safety,
            // to ensure that our caller will be able to find their expected
            // result in the correct cache key later.
            $reflector = new ReflectionClass($this->_strictSolveClassName);
            if ($this->_solveClassName !== $reflector->getName()) {
                throw new BadPropertyMapException(sprintf(
                    'Unable to compile class "%s" due to mismatched class name parameter value (the real class name is: "%s").',
                    $this->_strictSolveClassName, Utilities::createStrictClassPath($reflector->getName())
                ));
            }

            // Now resolve all classes in its inheritance ("extends") chain.
            do {
                // Store the class in the hierarchy.
                // NOTE: The key is VERY important because it's used later when
                // checking if a specific class exists in the current hierarchy.
                $this->_classHierarchy[$reflector->getName()] = [
                    'reflector'       => $reflector,
                    'namespace'       => $reflector->getNamespaceName(),
                    'className'       => $reflector->getName(), // Includes namespace.
                    'strictClassName' => Utilities::createStrictClassPath($reflector->getName()),
                ];

                // Update the reflector variable to point at the next parent
                // class in its hierarchy (or false if no more exists).
                $reflector = $reflector->getParentClass();
            } while ($reflector !== false);

            // Reverse the list to fix the order, since we built it "bottom-up".
            $this->_classHierarchy = array_reverse($this->_classHierarchy, true);
        } catch (ReflectionException $e) {
            // This should only be able to fail if the classname was invalid.
            throw new BadPropertyMapException(sprintf(
                'Reflection of class hierarchy failed for class "%s". Reason: "%s".',
                $this->_strictSolveClassName, $e->getMessage()
            ));
        }
    }
private function _reflectSolveClassHierarchy ( ) { if ( ! empty ( $ this -> _classHierarchy ) ) { throw new BadPropertyMapException ( 'Detected multiple calls to _reflectSolveClassHierarchy().' ) ; } try { // Begin reflecting the "solve-class". And completely refuse to // proceed if the class name we were asked to solve doesn't match // its EXACT real name. It's just a nice bonus check for safety, // to ensure that our caller will be able to find their expected // result in the correct cache key later. $ reflector = new ReflectionClass ( $ this -> _strictSolveClassName ) ; if ( $ this -> _solveClassName !== $ reflector -> getName ( ) ) { throw new BadPropertyMapException ( sprintf ( 'Unable to compile class "%s" due to mismatched class name parameter value (the real class name is: "%s").' , $ this -> _strictSolveClassName , Utilities :: createStrictClassPath ( $ reflector -> getName ( ) ) ) ) ; } // Now resolve all classes in its inheritance ("extends") chain. do { // Store the class in the hierarchy. // NOTE: The key is VERY important because it's used later when // checking if a specific class exists in the current hierarchy. $ this -> _classHierarchy [ $ reflector -> getName ( ) ] = [ 'reflector' => $ reflector , 'namespace' => $ reflector -> getNamespaceName ( ) , 'className' => $ reflector -> getName ( ) , // Includes namespace. 'strictClassName' => Utilities :: createStrictClassPath ( $ reflector -> getName ( ) ) , ] ; // Update the reflector variable to point at the next parent // class in its hierarchy (or false if no more exists). $ reflector = $ reflector -> getParentClass ( ) ; } while ( $ reflector !== false ) ; // Reverse the list to fix the order, since we built it "bottom-up". $ this -> _classHierarchy = array_reverse ( $ this -> _classHierarchy , true ) ; } catch ( ReflectionException $ e ) { // This should only be able to fail if the classname was invalid. throw new BadPropertyMapException ( sprintf ( 'Reflection of class hierarchy failed for class "%s". Reason: "%s".' , $ this -> _strictSolveClassName , $ e -> getMessage ( ) ) ) ; } }
Reflect all classes in the solve-class hierarchy.

Builds a list of all classes in the inheritance chain, with the
base-level class as the first element, and the solve-class as the
last element. (The order is important!)

@throws BadPropertyMapException
Reflect all classes in the solve - class hierarchy .