mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-04-17 19:57:24 +03:00
add factory
This commit is contained in:
parent
9319f3d89c
commit
95c5821097
@ -33,8 +33,16 @@ use Handlebars\Cache\Dummy;
|
||||
|
||||
class Handlebars
|
||||
{
|
||||
private static $instance = false;
|
||||
const VERSION = '1.0.0';
|
||||
|
||||
public static function factory ($options=array()) {
|
||||
if (self::$instance === false) {
|
||||
self::$instance = new Handlebars($options);
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Tokenizer
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user