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")); }
public function __construct($driver = '') { $this->cache = Driver::run('Cache', $driver); }
/** * Alias for driver run */ public function run() { $this->clearState(); return $this->driver->run(); }
public function __construct($driver = '') { $this->compress = Driver::run('Compress', $driver); }
public function __construct($driver = '') { $this->crypto = Driver::run('Encode', $driver); }
public function __construct($driver = '') { $this->email = Driver::run('Email', $driver); $this->driver = !empty($driver) ? $driver : Config::get('Email', 'driver'); $this->settings(); }