public function add($resource)
    {
        if (!isset($this->added[$path = $resource->getPath()])) {
            $this->queue->add($resource);
            $this->added[$path] = true;
        }
    }