protected function addPlaces(array $places) { $code = ''; foreach ($places as $id => $place) { $code .= sprintf(" place_%s [label=\"%s\", shape=circle%s];\n", $this->dotize($id), $id, $this->addAttributes($place['attributes'])); } return $code; }