diff --git a/Model/Arrow/BaseArrow.php b/Model/Arrow/BaseArrow.php index 7d9893e6b0ba99aa074438f5bebd656636a772ce..e96270aa52a4391398a9d1e4fc9d9d5524ebf08a 100644 --- a/Model/Arrow/BaseArrow.php +++ b/Model/Arrow/BaseArrow.php @@ -55,14 +55,14 @@ class BaseArrow implements ArrowInterface protected function writeLabelTo(WriterInterface $writer) { if ($this->label) { - $writer->printf(" : %s", $this->label); + $writer->writeFormatted(" : %s", $this->label); } return $this; } protected function writeLinkTo(WriterInterface $writer) { - $writer->printf(" %s ", $this->link); + $writer->writeFormatted(" %s ", $this->link); return $this; } } diff --git a/Model/Namespace_/FlatNamespace.php b/Model/Namespace_/FlatNamespace.php index 362e794bbaffc652dd13478fb32e7b4b60a96291..8042bc2ff4eaa1b0e3235b188f7409c015a2a16c 100644 --- a/Model/Namespace_/FlatNamespace.php +++ b/Model/Namespace_/FlatNamespace.php @@ -33,7 +33,7 @@ class FlatNamespace extends AbstractNamespace public function writeTo(WriterInterface $writer) { - $writer->printf("set namespaceSeparator %s\n", static::SEPARATOR); + $writer->writeFormatted("set namespaceSeparator %s\n", static::SEPARATOR); $this ->writeNodesTo($writer) ->writeArrowsTo($writer); diff --git a/Model/Namespace_/Php/Namespace_.php b/Model/Namespace_/Php/Namespace_.php index 279a089472c81ae2786c005ebc3785796b7ff207..36241a04c41a880bb00e783bcadc9b6f6ba6dd5c 100644 --- a/Model/Namespace_/Php/Namespace_.php +++ b/Model/Namespace_/Php/Namespace_.php @@ -72,7 +72,7 @@ class Namespace_ extends AbstractNamespace } $writer - ->printf("namespace %s {\n", $this->name) + ->writeFormatted("namespace %s {\n", $this->name) ->indent(); $this ->writeNodesTo($writer) diff --git a/Model/Node/BaseNode.php b/Model/Node/BaseNode.php index 5878209166e50219e5395738853485bb0b583aa4..1a5cd69c0716426a9eac92104ab68b8b7033d7b6 100644 --- a/Model/Node/BaseNode.php +++ b/Model/Node/BaseNode.php @@ -91,7 +91,7 @@ class BaseNode implements NodeInterface $this ->writeClassifiersTo($writer) ->writeNodeTypeTo($writer); - $writer->printf('"%s" as %s', $this->label, $this->id); + $writer->writeFormatted('"%s" as %s', $this->label, $this->id); $this ->writeStereotypesTo($writer); $writer @@ -115,21 +115,21 @@ class BaseNode implements NodeInterface protected function writeClassifiersTo(WriterInterface $writer) { foreach($this->classifiers as $classifier) { - $writer->printf('%s ', $classifier); + $writer->writeFormatted('%s ', $classifier); } return $this; } protected function writeNodeTypeTo(WriterInterface $writer) { - $writer->printf('%s ', $this->nodeType); + $writer->writeFormatted('%s ', $this->nodeType); return $this; } protected function writeStereotypesTo(WriterInterface $writer) { foreach($this->stereotypes as $stereotype) { - $writer->printf(' <<%s>>', $stereotype); + $writer->writeFormatted(' <<%s>>', $stereotype); } return $this; } diff --git a/Writer/AbstractWriter.php b/Writer/AbstractWriter.php index 7a14d3a2f40401feb7ba39506b1a8f556e41771a..e06c3385c372a1436e8dc4ab6544a091847bdf81 100644 --- a/Writer/AbstractWriter.php +++ b/Writer/AbstractWriter.php @@ -37,7 +37,7 @@ abstract class AbstractWriter implements WriterInterface return $this; } - public function printf($format) + public function writeFormatted($format) { $args = func_get_args(); array_shift($args); diff --git a/Writer/WriterInterface.php b/Writer/WriterInterface.php index 06036fa3c2175b09cf07de21033e01ce5c5281da..d0ad058f4077805b3560579338edd521e96f9577 100644 --- a/Writer/WriterInterface.php +++ b/Writer/WriterInterface.php @@ -37,5 +37,5 @@ interface WriterInterface * @param mixed ... * @return self */ - public function printf($fmt); + public function writeFormatted($fmt); }