/**
  * @param DocumentAbstract $document
  *
  * @throws \Exception
  */
 private function throwResourcesCombineExceptions(DocumentAbstract $document)
 {
     if ($document instanceof HtmlDocument) {
         $resources = array_merge($document->resources('javascript')->resources(), $document->resources('stylesheet')->resources());
         foreach ($resources as $resource) {
             if ($resource instanceof CombineResourceInterface && $resource->getCombineObject()->getException() instanceof \Exception) {
                 throw $resource->getCombineObject()->getException();
             }
         }
     }
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function keywords($set = null)
 {
     $words = parent::keywords($set);
     $this->insertToHead($this->keywords, $set, function (HtmlElement $el) use($words) {
         $el->attr('name', 'keywords');
         $el->attr('content', strip_tags($words));
     });
     return $words;
 }