src/DotsUnited/BundleFu/Bundle.php
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;
    }
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;
    }
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 ; }
Extract files from HTML.

@param  string $html
@param  string $docRoot
@return Bundle
Extract files from HTML .