public function remove($resource)
    {
        $resourceName = $this->getResourceName($resource);
        $index = array_search($resourceName, $this->indexes, true);

        if (false !== $index) {
            unset($this->indexes[$index]);
            unset($this->resources[$resourceName]);

            return true;
        }

        return false;
    }