diff --git a/composer.json b/composer.json index 87f9ff6..ae73c08 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ "php": ">=5.3.0", "ext-xsl": "*", "ext-zip": "*", - "shadz3rg/lexer": "^1.0" + "ext-dom": "*", + "shadz3rg/lexer": "^1.0", }, "authors": [ { diff --git a/src/PHPStamp/Templator.php b/src/PHPStamp/Templator.php index d38accd..2dd58fd 100644 --- a/src/PHPStamp/Templator.php +++ b/src/PHPStamp/Templator.php @@ -42,6 +42,7 @@ class Templator * * @param string $cachePath Writable path to store compiled template. * @param array $brackets Customizable placeholder brackets. + * @throws Exception\InvalidArgumentException */ public function __construct($cachePath, $brackets = array('[[', ']]')) { @@ -65,6 +66,7 @@ public function __construct($cachePath, $brackets = array('[[', ']]')) * @param DocumentInterface $document Document to render. * @param array $values Multidimensional array with values to replace placeholders. * @return Result + * @throws Exception\InvalidArgumentException */ public function render(DocumentInterface $document, array $values) { @@ -88,6 +90,7 @@ public function render(DocumentInterface $document, array $values) * * @param DocumentInterface $document Document to render. * @return \DOMDocument XSL stylesheet. + * @throws Exception\InvalidArgumentException */ private function getTemplate(DocumentInterface $document) {