public function indexOf($string, $offset = 0) { if ($string instanceof Query) { return $string->firstIndexIn($this); } else { return parent::indexOf($string, $offset); } }