indexOf() public method

public indexOf ( $item ) : integer
return integer the index of the item in the list (0 based), -1 if not found.
Esempio n. 1
0
 public function testIndexOf()
 {
     $list = new TPagedList(array(1, 2, 3));
     $list->CustomPaging = true;
     self::assertEquals(0, $list->indexOf(1));
     self::assertEquals(-1, $list->indexOf(0));
 }