Prado\Web\THttpRequest::clear PHP Method

clear() public method

Removes all items in the request.
public clear ( )
    public function clear()
    {
        foreach (array_keys($this->_items) as $key) {
            $this->remove($key);
        }
    }

Usage Example

Esempio n. 1
0
 public function testClear()
 {
     $request = new THttpRequest();
     $request->init(null);
     // Simulate a request with just a service
     $_GET['page'] = 'Home';
     $request->resolveRequest(array('page'));
     $request->clear();
     self::assertEquals(0, $request->getCount());
 }