get() public method

Gets a variable.
public get ( string $key = null ) : mixed
$key string Key
return mixed
コード例 #1
1
ファイル: RedirectTest.php プロジェクト: JiYoungP/likeapro
 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));
 }
コード例 #2
0
ファイル: VariableTest.php プロジェクト: JiYoungP/likeapro
 function testClearAll()
 {
     $this->app->set('c', 1);
     $this->app->clear();
     $var = $this->app->get('c');
     $this->assertEquals(null, $var);
 }