public findIndexByID ( $id ) : integer | ||
return | integer | the index of the meta tag found, -1 if not found. |
public function findIndexByID($id)
{
$index = 0;
foreach ($this as $item) {
if ($item->getID() === $id) {
return $index;
}
$index++;
}
return -1;
}