public function getAncestry($dataObjectClass)
    {
        $classes = [];
        $ancestry = array_reverse(ClassInfo::ancestry($dataObjectClass));

        foreach ($ancestry as $class) {
            if ($class === $dataObjectClass) {
                continue;
            }
            if ($class == DataObject::class) {
                break;
            }
            $classes[] = $class;
        }

        return $classes;
    }
public function getAncestry($dataObjectClass)
    {
        $classes = [];
        $ancestry = array_reverse(ClassInfo::ancestry($dataObjectClass));

        foreach ($ancestry as $class) {
            if ($class === $dataObjectClass) {
                continue;
            }
            if ($class == DataObject::class) {
                break;
            }
            $classes[] = $class;
        }

        return $classes;
    }
public function getAncestry ( $ dataObjectClass ) { $ classes = [ ] ; $ ancestry = array_reverse ( ClassInfo :: ancestry ( $ dataObjectClass ) ) ; foreach ( $ ancestry as $ class ) { if ( $ class === $ dataObjectClass ) { continue ; } if ( $ class == DataObject :: class ) { break ; } $ classes [ ] = $ class ; } return $ classes ; }
Gets all ancestors of a DataObject
@param string $dataObjectClass
@return array
Gets all ancestors of a DataObject