original_string: public function addEvent($marker, $infoWindow, $open = false) {
  		$this->map .= "
  			google.maps.event.addListener(gMarkers" . static::$mapCount . "[{$marker}], 'click', function() {
  				gInfoWindows" . static::$mapCount . "[$infoWindow].open(" . $this->name() . ", this);
  			});
  		";
  		if ($open) {
  			$event = 'gInfoWindows' . static::$mapCount . "[$infoWindow].open(" . $this->name() .
  				', gMarkers' . static::$mapCount . '[' . $marker . ']);';
  			$this->addCustom($event);
  		}
  	}
code: public function addEvent($marker, $infoWindow, $open = false) {
  		$this->map .= "
  			google.maps.event.addListener(gMarkers" . static::$mapCount . "[{$marker}], 'click', function() {
  				gInfoWindows" . static::$mapCount . "[$infoWindow].open(" . $this->name() . ", this);
  			});
  		";
  		if ($open) {
  			$event = 'gInfoWindows' . static::$mapCount . "[$infoWindow].open(" . $this->name() .
  				', gMarkers' . static::$mapCount . '[' . $marker . ']);';
  			$this->addCustom($event);
  		}
  	}
code_tokens: public function addEvent ( $ marker , $ infoWindow , $ open = false ) { $ this -> map .= "
  			google.maps.event.addListener(gMarkers" . static :: $ mapCount . "[{$marker}], 'click', function() {
  				gInfoWindows" . static :: $ mapCount . "[$infoWindow].open(" . $ this -> name ( ) . ", this);
  			});
  		" ; if ( $ open ) { $ event = 'gInfoWindows' . static :: $ mapCount . "[$infoWindow].open(" . $ this -> name ( ) . ', gMarkers' . static :: $ mapCount . '[' . $ marker . ']);' ; $ this -> addCustom ( $ event ) ; } }
docstring: Add event to open marker on click.
  
  @param int $marker
  @param int $infoWindow
  @param bool $open Also open it right away.
  @return void
docstring_tokens: Add event to open marker on click .