public function addInterface($interface, $extends = [])
    {
        $interfaceId = $this->registerInterface($interface);
        if (!empty($extends)) {
            $interfaceIds = [];
            foreach ($extends as $name) {
                $interfaceIds[] = $this->registerInterface($name);
            }
            $this->interfaceExtends[$interfaceId] = $interfaceIds;
        }
    }