Beispiel #1
0
 function testRegistry()
 {
     $this->assertNull($this->loop->getState("foo"));
     $this->loop->setState("foo", NAN);
     $this->assertTrue(is_nan($this->loop->getState("foo")));
     $this->loop->setState("foo", "1");
     $this->assertNull($this->loop->getState("bar"));
     $this->loop->setState("baz", -INF);
     // running must not affect state
     $this->loop->defer([$this->loop, "stop"]);
     $this->loop->run();
     $this->assertSame(-INF, $this->loop->getState("baz"));
     $this->assertSame("1", $this->loop->getState("foo"));
 }
Beispiel #2
0
 public function __construct($driver = '')
 {
     $this->cache = Driver::run('Cache', $driver);
 }
Beispiel #3
0
 /**
  * Alias for driver run
  */
 public function run()
 {
     $this->clearState();
     return $this->driver->run();
 }
 public function __construct($driver = '')
 {
     $this->compress = Driver::run('Compress', $driver);
 }
Beispiel #5
0
 public function __construct($driver = '')
 {
     $this->crypto = Driver::run('Encode', $driver);
 }
Beispiel #6
0
 public function __construct($driver = '')
 {
     $this->email = Driver::run('Email', $driver);
     $this->driver = !empty($driver) ? $driver : Config::get('Email', 'driver');
     $this->settings();
 }