function __construct($coordX, $coordY, $guid = null) { $this->x = $coordX; $this->y = $coordY; $this->guid = $guid; if (is_null($this->guid)) { $this->guid = str_pad($coordX, 0, '0', STR_PAD_LEFT) . ',' . str_pad($coordY, 0, '0', STR_PAD_LEFT); } }
function __construct() { parent::__construct(); require_once 'libs/Twig-1.16.0/lib/Twig/Autoloader.php'; \Twig_Autoloader::register(); //$this->loader = new \Twig_Loader_String(); $this->loader = new \Twig_Loader_Filesystem('./'); $this->twig = new \Twig_Environment($this->loader, array('cache' => 'libs/Twig-1.16.0/cache', 'debug' => true)); $this->twig->addExtension(new \Twig_Extension_Debug()); }