protected function EasyRdf_Serialiser_GraphViz::escapeAttributes

Internal function to escape an associate array of attributes and turns it into a DOT notation string

@ignore

1 call to EasyRdf_Serialiser_GraphViz::escapeAttributes()
EasyRdf_Serialiser_GraphViz::serialiseRow in drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php
Internal function to create dot syntax line for either a node or an edge

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php, line 222

Class

EasyRdf_Serialiser_GraphViz
Class to serialise an EasyRdf_Graph to GraphViz

Code

protected function escapeAttributes($array) {
  $items = '';
  foreach ($array as $k => $v) {
    $items[] = $this
      ->escape($k) . '=' . $this
      ->escape($v);
  }
  return '[' . implode(',', $items) . ']';
}