count() public method

This method is required by \Countable interface.
public count ( ) : integer
return integer number of items in the request.
コード例 #1
0
ファイル: THttpRequestTest.php プロジェクト: pradosoft/prado
 public function testOffsetUnset()
 {
     $request = new THttpRequest();
     $request->init(null);
     $request->offsetSet(0, 'test');
     // Count should be 1
     self::assertEquals(1, $request->count());
     $request->offsetUnset(0);
     // Now, count should be zero
     self::assertEquals(0, $request->count());
 }