Improve providers. Renders now use bulk checks via ::verify

This commit is contained in:
bzick
2013-07-13 12:00:19 +04:00
parent 3583a2cdfd
commit 617fc7324c
6 changed files with 93 additions and 42 deletions

View File

@ -246,6 +246,7 @@ class Fenom {
throw new InvalidArgumentException("Source must be a valid path or provider object");
}
$fenom = new static($provider);
/* @var Fenom $fenom */
$fenom->setCompileDir($compile_dir);
if($options) {
$fenom->setOptions($options);
@ -595,7 +596,6 @@ class Fenom {
* @param $callback
* @param float $chunk
* @return \Fenom\Render
* @example $fenom->pipe("products.yml.tpl", $iterators, [new SplFileObject("/tmp/products.yml"), "fwrite"], 512*1024)
*/
public function pipe($template, array $vars, $callback, $chunk = 1e6) {
ob_start($callback, $chunk, true);