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