mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-02 10:16:41 +03:00
add factory
This commit is contained in:
parent
9319f3d89c
commit
95c5821097
@ -33,8 +33,16 @@ use Handlebars\Cache\Dummy;
|
|||||||
|
|
||||||
class Handlebars
|
class Handlebars
|
||||||
{
|
{
|
||||||
|
private static $instance = false;
|
||||||
const VERSION = '1.0.0';
|
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
|
* @var Tokenizer
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user