engine = $engine; } public $pairs; public function addPair($name, $value) { if ($this->pairs === null) { $this->pairs = []; } $this->pairs []= [$name, $value]; return $this; } public function __toString() { return implode(':', [ $this->engine, implode(';', array_map(function($item) { return implode('=', $item); }, $this->pairs)) ]); } }