Inheritance: use trait Webiny\Component\StdLib\StdLibTrait
コード例 #1
0
ファイル: QueryTest.php プロジェクト: Webiny/Framework
 public function testGetAll()
 {
     $_GET = ["name" => "jack", "surname" => "doe"];
     $query = new Query();
     $this->assertSame($_GET, $query->getAll());
 }
コード例 #2
0
ファイル: Request.php プロジェクト: Nkelliny/Framework
 /**
  * Get a value from $_GET param for the given $key.
  * If key doesn't not exist, $value will be returned and assigned under that key.
  *
  * @param string $key   Key for which you wish to get the value.
  * @param mixed  $value Default value that will be returned if $key doesn't exist.
  *
  * @return mixed Value of the given $key.
  */
 public function query($key = null, $value = null)
 {
     return $this->isNull($key) ? $this->query->getAll() : $this->query->get($key, $value);
 }