Commit 5f91175d authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

WriterInterface::printf => WriterInterface::writeFormatted.

parent a6e19bcf
......@@ -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;
}
}
......@@ -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);
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -37,5 +37,5 @@ interface WriterInterface
* @param mixed ...
* @return self
*/
public function printf($fmt);
public function writeFormatted($fmt);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment