table = $table; $this->index = $index; } /** * @param array $matches * @return mixed */ public function replace( array $matches ) { return $this->table[$matches[$this->index]]; } }