[Templating] added a __isset() method to the Engine

This commit is contained in:
Fabien Potencier 2010-05-20 13:50:14 +02:00
parent d14daf9275
commit 04a0032293
1 changed files with 12 additions and 0 deletions

View File

@ -152,6 +152,18 @@ class Engine
return $this->$name = $this->get($name);
}
/**
* Returns true if the helper if defined.
*
* @param string $name The helper name
*
* @return Boolean true if the helper is defined, false otherwise
*/
public function __isset($name)
{
return isset($this->helpers[$name]);
}
/**
* @param Helper[] $helpers An array of helper
*/