public function hasParent($parentClassName)
    {
        $found = false;

        $this->alongParents(function ($parent) use ($parentClassName, &$found) {
            if ($parent instanceof $parentClassName) {
                $found = true;

                return false;
            }

            return true;
        });

        return $found;
    }
public function hasParent($parentClassName)
    {
        $found = false;

        $this->alongParents(function ($parent) use ($parentClassName, &$found) {
            if ($parent instanceof $parentClassName) {
                $found = true;

                return false;
            }

            return true;
        });

        return $found;
    }
public function hasParent ( $ parentClassName ) { $ found = false ; $ this -> alongParents ( function ( $ parent ) use ( $ parentClassName , & $ found ) { if ( $ parent instanceof $ parentClassName ) { $ found = true ; return false ; } return true ; } ) ; return $ found ; }
Returns true if the class has a given parent.

@param string $parentClassName Name of the parent class.
@return bool
Returns true if the class has a given parent .