get() public method

Gets a variable.
public get ( string $key = null ) : mixed
$key string Key
return mixed
Beispiel #1
1
 function testBaseOverride()
 {
     $url = 'login';
     if ($this->app->get('flight.base_url') !== null) {
         $base = $this->app->get('flight.base_url');
     } else {
         $base = $this->app->request()->base;
     }
     $this->assertEquals('/testdir/login', $this->getBaseUrl($base, $url));
 }
Beispiel #2
0
 function testClearAll()
 {
     $this->app->set('c', 1);
     $this->app->clear();
     $var = $this->app->get('c');
     $this->assertEquals(null, $var);
 }