public function getRoot(string $class)
    {
        if (!is_a($class, Hierarchy::class, true))
            throw new TypeError("Not a subclass of Hierarchy: $class");

        $root = $class::getRootName();
        return $this->getInstance($class, $root);
    }
public function getRoot(string $class)
    {
        if (!is_a($class, Hierarchy::class, true))
            throw new TypeError("Not a subclass of Hierarchy: $class");

        $root = $class::getRootName();
        return $this->getInstance($class, $root);
    }
public function getRoot ( string $ class ) { if ( ! is_a ( $ class , Hierarchy :: class , true ) ) throw new TypeError ( "Not a subclass of Hierarchy: $class" ) ; $ root = $ class :: getRootName ( ) ; return $ this -> getInstance ( $ class , $ root ) ; }
Return the root element for a certain hierarchy

@param string $class The class name
@return Hierarchy The root element of the hierarchy
@throws Wedeto\Auth\ACL\Exception When an invalid class is passed
Return the root element for a certain hierarchy