public function __construct() { parent::__construct('Object'); $this->providers[] = function () { return new h\stack(); }; }
public function __construct($message = 'Escaper') { parent::__construct($message); $this->providers[] = function () { return new test_escaper(h\string('UTF-8')); }; }
public function __construct() { parent::__construct('Date'); $this->providers[] = function () { return new h\collection(); }; }
public function __construct() { parent::__construct('Database'); $dbcon = new \mysqli('localhost', 'test', 'test', 'test'); $this->providers[] = function () use($dbcon) { // I know, this is unsecure $forge = new h\sql\forge($dbcon); return $forge; }; }
public function __construct($message = 'Object') { parent::__construct($message); $this->providers[] = function () { return new thing_public(); }; $this->providers[] = function () { return new thing_of(); }; }
public function __construct($message = 'URL Factory') { parent::__construct($message); $factory = new h\uri\factory(); $factory->do_register_factory(h\string('a'), new tested_uri_factory($factory)); $this->providers[] = function () use($factory) { $uri = $factory->create(h\string('a:b')); return $uri; }; }
public function __construct($message = 'Time') { parent::__construct($message); //$this->providers[] = function () { return new h\time ; }; $this->providers[] = function () { return h\today(); }; $this->providers[] = function () { return h\tomorrow(); }; $this->providers[] = function () { return h\yesterday(); }; }