Exemplo n.º 1
0
 public function __construct()
 {
     parent::__construct('Object');
     $this->providers[] = function () {
         return new h\stack();
     };
 }
Exemplo n.º 2
0
 public function __construct($message = 'Escaper')
 {
     parent::__construct($message);
     $this->providers[] = function () {
         return new test_escaper(h\string('UTF-8'));
     };
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::__construct('Date');
     $this->providers[] = function () {
         return new h\collection();
     };
 }
Exemplo n.º 4
0
 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;
     };
 }
Exemplo n.º 5
0
 public function __construct($message = 'Object')
 {
     parent::__construct($message);
     $this->providers[] = function () {
         return new thing_public();
     };
     $this->providers[] = function () {
         return new thing_of();
     };
 }
Exemplo n.º 6
0
 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;
     };
 }
Exemplo n.º 7
0
 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();
     };
 }