public function registerClass(string $class, string $name)
    {
        if (isset($this->classes[$name]))
            throw new Exception("Cannot register the same name twice");
        if (!is_a($class, ACLModel::class, true))
            throw new TypeError("Class must be subclass of ACLModel");
    
        $this->classes[$name] = $class;
        $this->classes_names[$class] = $name;
        return $this;
    }