public function addEntry($entry)
    {
        if (is_string($entry)) {
            $class = $this->getClassFromType($entry);

            if ($class === null) {
                throw new SwatClassNotFoundException(
                    'SwatHtmlHeadEntry class not found for entry string of "' .
                        $entry .
                        '".'
                );
            }

            $entry = new $class($entry);
        }

        if (!($entry instanceof SwatHtmlHeadEntry)) {
            throw new SwatInvalidTypeException(
                'Added entry must be either a string or an instance of a' .
                    'SwatHtmlHeadEntry.',
                0,
                $entry
            );
        }

        $uri = $entry->getUri();
        if (!array_key_exists($uri, $this->entries)) {
            $this->entries[$uri] = $entry;
        }
    }