remove() public method

Removes an item from the request by its key.
public remove ( $key ) : mixed
return mixed the removed value, null if no such key exists.
Esempio n. 1
0
 public function testRemove()
 {
     $request = new THttpRequest();
     $request->init(null);
     // Simulate a request with just a service
     $_GET['page'] = 'Home';
     $request->resolveRequest(array('page'));
     // Remove an unknow key
     self::assertNull($request->remove('param1', 'value1'));
     // Remove a key
     self::assertEquals('Home', $request->remove('page'));
 }