src/ReflectionGenerator.php
protected function getParentClass(PackageClass $package_class)
    {
        try {
            $base_class = new \ReflectionClass($package_class->getName());
        } catch (\ReflectionException $e) {
            return null;
        }
        if (false === ($parent_reflection = $base_class->getParentClass())
            || dirname($parent_reflection->getFileName()) !== dirname($base_class->getFileName())
        ) {
            return null;
        }

        return new PackageClass($parent_reflection->getName(), $parent_reflection->getFileName());
    }
protected function getParentClass(PackageClass $package_class)
    {
        try {
            $base_class = new \ReflectionClass($package_class->getName());
        } catch (\ReflectionException $e) {
            return null;
        }
        if (false === ($parent_reflection = $base_class->getParentClass())
            || dirname($parent_reflection->getFileName()) !== dirname($base_class->getFileName())
        ) {
            return null;
        }

        return new PackageClass($parent_reflection->getName(), $parent_reflection->getFileName());
    }
protected function getParentClass ( PackageClass $ package_class ) { try { $ base_class = new \ ReflectionClass ( $ package_class -> getName ( ) ) ; } catch ( \ ReflectionException $ e ) { return null ; } if ( false === ( $ parent_reflection = $ base_class -> getParentClass ( ) ) || dirname ( $ parent_reflection -> getFileName ( ) ) !== dirname ( $ base_class -> getFileName ( ) ) ) { return null ; } return new PackageClass ( $ parent_reflection -> getName ( ) , $ parent_reflection -> getFileName ( ) ) ; }
Get the Parent of the given base class, if any.

@param PackageClass $package_class the base for which the parent needs to be extracted.
@return NULL|\Hostnet\Component\EntityPlugin\PackageClass the parent class if any, otherwise null is returned.
Get the Parent of the given base class if any .