public function extractFiles($html, $docRoot = null)
    {
        if (null === $docRoot) {
            $docRoot = $this->getDocRoot();
        }

        preg_match_all('/(href|src) *= *["\']([^"^\'^\?]+)/i', $html, $matches, PREG_SET_ORDER);

        foreach ($matches as $match) {
            if (strtolower($match[1]) == 'src') {
                $this->addJsFile($match[2], $docRoot);
            } else {
                $this->addCssFile($match[2], $docRoot);
            }
        }

        return $this;
    }