private function extractStyleSheet(Element $element){
        if($element instanceof StyleSheet){
            $href = $element->attr('href');
            $this->addAsset('css', $href);

            $parsedUrl = parse_url($href);
            if ($this->isDeepParsing() && array_key_exists('path', $parsedUrl) && !array_key_exists('host',
                    $parsedUrl)
            ) {
                $file = $this->directory->getFile($parsedUrl['path']);
                if ($file->exists()) {
                    $this->loadStyleSheetAsset($file->read());
                }
            }
        }
    }
private function extractStyleSheet(Element $element){
        if($element instanceof StyleSheet){
            $href = $element->attr('href');
            $this->addAsset('css', $href);

            $parsedUrl = parse_url($href);
            if ($this->isDeepParsing() && array_key_exists('path', $parsedUrl) && !array_key_exists('host',
                    $parsedUrl)
            ) {
                $file = $this->directory->getFile($parsedUrl['path']);
                if ($file->exists()) {
                    $this->loadStyleSheetAsset($file->read());
                }
            }
        }
    }
private function extractStyleSheet ( Element $ element ) { if ( $ element instanceof StyleSheet ) { $ href = $ element -> attr ( 'href' ) ; $ this -> addAsset ( 'css' , $ href ) ; $ parsedUrl = parse_url ( $ href ) ; if ( $ this -> isDeepParsing ( ) && array_key_exists ( 'path' , $ parsedUrl ) && ! array_key_exists ( 'host' , $ parsedUrl ) ) { $ file = $ this -> directory -> getFile ( $ parsedUrl [ 'path' ] ) ; if ( $ file -> exists ( ) ) { $ this -> loadStyleSheetAsset ( $ file -> read ( ) ) ; } } } }
Lookup and extract assets from a stylesheet element
@param Element $element the stylesheet element
Lookup and extract assets from a stylesheet element