protected function forgetClass($className)
    {
        $this->log('Forget class ' . $className, LogLevel::DEBUG);
        if (isset($this->classesCurrentlyBeingForgotten[$className])) {
            $this->log('Detected recursion while forgetting class ' . $className, LogLevel::WARNING);
            return;
        }
        $this->classesCurrentlyBeingForgotten[$className] = true;

        if (class_exists($className)) {
            $interfaceNames = class_implements($className);
            foreach ($interfaceNames as $interfaceName) {
                if (isset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className])) {
                    unset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className]);
                }
            }
        } else {
            foreach ($this->availableClassNames as $interfaceNames) {
                foreach ($interfaceNames as $interfaceName) {
                    if (isset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className])) {
                        unset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className]);
                    }
                }
            }
        }

        if (isset($this->classReflectionData[$className][self::DATA_CLASS_SUBCLASSES])) {
            foreach (array_keys($this->classReflectionData[$className][self::DATA_CLASS_SUBCLASSES]) as $subClassName) {
                $this->forgetClass($subClassName);
            }
        }

        foreach (array_keys($this->annotatedClasses) as $annotationClassName) {
            if (isset($this->annotatedClasses[$annotationClassName][$className])) {
                unset($this->annotatedClasses[$annotationClassName][$className]);
            }
        }

        if (isset($this->classSchemata[$className])) {
            unset($this->classSchemata[$className]);
        }

        foreach (array_keys($this->classesByMethodAnnotations) as $annotationClassName) {
            unset($this->classesByMethodAnnotations[$annotationClassName][$className]);
        }

        unset($this->classReflectionData[$className]);
        unset($this->classesCurrentlyBeingForgotten[$className]);
    }
protected function forgetClass($className)
    {
        $this->log('Forget class ' . $className, LogLevel::DEBUG);
        if (isset($this->classesCurrentlyBeingForgotten[$className])) {
            $this->log('Detected recursion while forgetting class ' . $className, LogLevel::WARNING);
            return;
        }
        $this->classesCurrentlyBeingForgotten[$className] = true;

        if (class_exists($className)) {
            $interfaceNames = class_implements($className);
            foreach ($interfaceNames as $interfaceName) {
                if (isset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className])) {
                    unset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className]);
                }
            }
        } else {
            foreach ($this->availableClassNames as $interfaceNames) {
                foreach ($interfaceNames as $interfaceName) {
                    if (isset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className])) {
                        unset($this->classReflectionData[$interfaceName][self::DATA_INTERFACE_IMPLEMENTATIONS][$className]);
                    }
                }
            }
        }

        if (isset($this->classReflectionData[$className][self::DATA_CLASS_SUBCLASSES])) {
            foreach (array_keys($this->classReflectionData[$className][self::DATA_CLASS_SUBCLASSES]) as $subClassName) {
                $this->forgetClass($subClassName);
            }
        }

        foreach (array_keys($this->annotatedClasses) as $annotationClassName) {
            if (isset($this->annotatedClasses[$annotationClassName][$className])) {
                unset($this->annotatedClasses[$annotationClassName][$className]);
            }
        }

        if (isset($this->classSchemata[$className])) {
            unset($this->classSchemata[$className]);
        }

        foreach (array_keys($this->classesByMethodAnnotations) as $annotationClassName) {
            unset($this->classesByMethodAnnotations[$annotationClassName][$className]);
        }

        unset($this->classReflectionData[$className]);
        unset($this->classesCurrentlyBeingForgotten[$className]);
    }
protected function forgetClass ( $ className ) { $ this -> log ( 'Forget class ' . $ className , LogLevel :: DEBUG ) ; if ( isset ( $ this -> classesCurrentlyBeingForgotten [ $ className ] ) ) { $ this -> log ( 'Detected recursion while forgetting class ' . $ className , LogLevel :: WARNING ) ; return ; } $ this -> classesCurrentlyBeingForgotten [ $ className ] = true ; if ( class_exists ( $ className ) ) { $ interfaceNames = class_implements ( $ className ) ; foreach ( $ interfaceNames as $ interfaceName ) { if ( isset ( $ this -> classReflectionData [ $ interfaceName ] [ self :: DATA_INTERFACE_IMPLEMENTATIONS ] [ $ className ] ) ) { unset ( $ this -> classReflectionData [ $ interfaceName ] [ self :: DATA_INTERFACE_IMPLEMENTATIONS ] [ $ className ] ) ; } } } else { foreach ( $ this -> availableClassNames as $ interfaceNames ) { foreach ( $ interfaceNames as $ interfaceName ) { if ( isset ( $ this -> classReflectionData [ $ interfaceName ] [ self :: DATA_INTERFACE_IMPLEMENTATIONS ] [ $ className ] ) ) { unset ( $ this -> classReflectionData [ $ interfaceName ] [ self :: DATA_INTERFACE_IMPLEMENTATIONS ] [ $ className ] ) ; } } } } if ( isset ( $ this -> classReflectionData [ $ className ] [ self :: DATA_CLASS_SUBCLASSES ] ) ) { foreach ( array_keys ( $ this -> classReflectionData [ $ className ] [ self :: DATA_CLASS_SUBCLASSES ] ) as $ subClassName ) { $ this -> forgetClass ( $ subClassName ) ; } } foreach ( array_keys ( $ this -> annotatedClasses ) as $ annotationClassName ) { if ( isset ( $ this -> annotatedClasses [ $ annotationClassName ] [ $ className ] ) ) { unset ( $ this -> annotatedClasses [ $ annotationClassName ] [ $ className ] ) ; } } if ( isset ( $ this -> classSchemata [ $ className ] ) ) { unset ( $ this -> classSchemata [ $ className ] ) ; } foreach ( array_keys ( $ this -> classesByMethodAnnotations ) as $ annotationClassName ) { unset ( $ this -> classesByMethodAnnotations [ $ annotationClassName ] [ $ className ] ) ; } unset ( $ this -> classReflectionData [ $ className ] ) ; unset ( $ this -> classesCurrentlyBeingForgotten [ $ className ] ) ; }
Forgets all reflection data related to the specified class

@param string $className Name of the class to forget
@return void
Forgets all reflection data related to the specified class