diff --git a/Command/GenerateCommand.php b/Command/GenerateCommand.php index d2748355f0ba6d29b44314eb458def70765cdd2b..64eaba010298c117751f3fda3ae130fcd653ad39 100644 --- a/Command/GenerateCommand.php +++ b/Command/GenerateCommand.php @@ -115,7 +115,7 @@ class GenerateCommand extends ContainerAwareCommand $graph->visitAll(); $writer = new OutputWriter($output); - $graph->outputTo($writer); + $graph->writeTo($writer); } /** diff --git a/Model/Arrow/BaseArrow.php b/Model/Arrow/BaseArrow.php index f281c23ecf892694622156388010929033c725fe..7d9893e6b0ba99aa074438f5bebd656636a772ce 100644 --- a/Model/Arrow/BaseArrow.php +++ b/Model/Arrow/BaseArrow.php @@ -42,17 +42,17 @@ class BaseArrow implements ArrowInterface $this->label = $label; } - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { - $this->source->outputAliasTo($writer); - $this->outputLinkTo($writer); - $this->target->outputAliasTo($writer); - $this->outputLabelTo($writer); + $this->source->writeAliasTo($writer); + $this->writeLinkTo($writer); + $this->target->writeAliasTo($writer); + $this->writeLabelTo($writer); $writer->write("\n"); return $this; } - protected function outputLabelTo(WriterInterface $writer) + protected function writeLabelTo(WriterInterface $writer) { if ($this->label) { $writer->printf(" : %s", $this->label); @@ -60,7 +60,7 @@ class BaseArrow implements ArrowInterface return $this; } - protected function outputLinkTo(WriterInterface $writer) + protected function writeLinkTo(WriterInterface $writer) { $writer->printf(" %s ", $this->link); return $this; diff --git a/Model/ClassVisitor.php b/Model/ClassVisitor.php index c793cf1311c1be347b6eedfd604031113cf4d7d9..71d402f0a383bbbccdf6d5144158b40e5d69787f 100644 --- a/Model/ClassVisitor.php +++ b/Model/ClassVisitor.php @@ -119,8 +119,8 @@ class ClassVisitor implements ClassVisitorInterface return new Class_($namespace, $className, $class->isAbstract(), $class->isFinal()); } - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { - return $this->rootNamespace->outputTo($writer); + return $this->rootNamespace->writeTo($writer); } } diff --git a/Model/Graph.php b/Model/Graph.php index 9442c1fffe2233aaa25cae118b563117abbea3ec..a0495408f43fed2c59cd3688a46c32b5ac495035 100644 --- a/Model/Graph.php +++ b/Model/Graph.php @@ -41,10 +41,10 @@ class Graph implements GraphInterface } } - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { $writer->write("@startuml@\n"); - $this->visitor->outputTo($writer); + $this->visitor->writeTo($writer); $writer->write("@enduml@\n"); return $this; } diff --git a/Model/Namespace_/AbstractNamespace.php b/Model/Namespace_/AbstractNamespace.php index db728eaadb1be96b0d49b2f890780f97a308f14b..c65d05e305ed261c5de4d881f1913c72e1f4e113 100644 --- a/Model/Namespace_/AbstractNamespace.php +++ b/Model/Namespace_/AbstractNamespace.php @@ -39,10 +39,10 @@ abstract class AbstractNamespace implements WritableInterface, NamespaceInterfac * @param WriterInterface $writer * @return self */ - protected function outputNodesTo(WriterInterface $writer) + protected function writeNodesTo(WriterInterface $writer) { foreach ($this->nodes as $node) { - $node->outputTo($writer); + $node->writeTo($writer); } return $this; } diff --git a/Model/Namespace_/FlatNamespace.php b/Model/Namespace_/FlatNamespace.php index 587fb8d6288f6e976c7ca524cc912b7e16d4fd13..362e794bbaffc652dd13478fb32e7b4b60a96291 100644 --- a/Model/Namespace_/FlatNamespace.php +++ b/Model/Namespace_/FlatNamespace.php @@ -31,19 +31,19 @@ class FlatNamespace extends AbstractNamespace return $this; } - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { $writer->printf("set namespaceSeparator %s\n", static::SEPARATOR); $this - ->outputNodesTo($writer) - ->outputArrowsTo($writer); + ->writeNodesTo($writer) + ->writeArrowsTo($writer); return $this; } - protected function outputArrowsTo(WriterInterface $writer) + protected function writeArrowsTo(WriterInterface $writer) { foreach ($this->arrows as $arrow) { - $arrow->outputTo($writer); + $arrow->writeTo($writer); } return $this; } diff --git a/Model/Namespace_/Php/AbstractNamespace.php b/Model/Namespace_/Php/AbstractNamespace.php index d0ba86c3b3aecbdf89df2c9d9e47b6522c9d2414..10756b0b699f32eb3f1a60239c0c1949d1149751 100644 --- a/Model/Namespace_/Php/AbstractNamespace.php +++ b/Model/Namespace_/Php/AbstractNamespace.php @@ -58,10 +58,10 @@ abstract class AbstractNamespace extends Base * @param WriterInterface $writer * @return self */ - protected function outputChildrenTo(WriterInterface $writer) + protected function writeChildrenTo(WriterInterface $writer) { foreach ($this->children as $child) { - $child->outputTo($writer); + $child->writeTo($writer); } return $this; } diff --git a/Model/Namespace_/Php/Namespace_.php b/Model/Namespace_/Php/Namespace_.php index 7fff4a592d2401f90e5ecdbf7b7b396badf430d2..279a089472c81ae2786c005ebc3785796b7ff207 100644 --- a/Model/Namespace_/Php/Namespace_.php +++ b/Model/Namespace_/Php/Namespace_.php @@ -65,7 +65,7 @@ class Namespace_ extends AbstractNamespace * @param resource WriterInterface $writer * @return self */ - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { if ($this->isEmpty()) { return; @@ -75,8 +75,8 @@ class Namespace_ extends AbstractNamespace ->printf("namespace %s {\n", $this->name) ->indent(); $this - ->outputNodesTo($writer) - ->outputChildrenTo($writer); + ->writeNodesTo($writer) + ->writeChildrenTo($writer); $writer ->dedent() ->write("}\n"); diff --git a/Model/Namespace_/Php/RootNamespace.php b/Model/Namespace_/Php/RootNamespace.php index 7b07b8b26945cd16717dfb53292ca5afcac1e406..bf94bf2e7c27366fea6a7512aa76f6abc2dc1d72 100644 --- a/Model/Namespace_/Php/RootNamespace.php +++ b/Model/Namespace_/Php/RootNamespace.php @@ -29,20 +29,20 @@ class RootNamespace extends AbstractNamespace return $this; } - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { $writer->write("set namespaceSeparator .\n"); $this - ->outputNodesTo($writer) - ->outputChildrenTo($writer) - ->outputArrowsTo($writer); + ->writeNodesTo($writer) + ->writeChildrenTo($writer) + ->writeArrowsTo($writer); return $this; } - protected function outputArrowsTo(WriterInterface $writer) + protected function writeArrowsTo(WriterInterface $writer) { foreach ($this->arrows as $arrow) { - $arrow->outputTo($writer); + $arrow->writeTo($writer); } return $this; } diff --git a/Model/Node/BaseNode.php b/Model/Node/BaseNode.php index 1be3396715f59312754bc495811714d5460f06a1..5878209166e50219e5395738853485bb0b583aa4 100644 --- a/Model/Node/BaseNode.php +++ b/Model/Node/BaseNode.php @@ -86,33 +86,33 @@ class BaseNode implements NodeInterface return $this; } - public function outputTo(WriterInterface $writer) + public function writeTo(WriterInterface $writer) { $this - ->outputClassifiersTo($writer) - ->outputNodeTypeTo($writer); + ->writeClassifiersTo($writer) + ->writeNodeTypeTo($writer); $writer->printf('"%s" as %s', $this->label, $this->id); $this - ->outputStereotypesTo($writer); + ->writeStereotypesTo($writer); $writer ->write(" {\n") ->indent(); $this - ->outputAttributesTo($writer) - ->outputMethodsTo($writer); + ->writeAttributesTo($writer) + ->writeMethodsTo($writer); $writer ->dedent() ->write("}\n"); return $this; } - public function outputAliasTo(WriterInterface $writer) + public function writeAliasTo(WriterInterface $writer) { $writer->write($this->id); return $this; } - protected function outputClassifiersTo(WriterInterface $writer) + protected function writeClassifiersTo(WriterInterface $writer) { foreach($this->classifiers as $classifier) { $writer->printf('%s ', $classifier); @@ -120,13 +120,13 @@ class BaseNode implements NodeInterface return $this; } - protected function outputNodeTypeTo(WriterInterface $writer) + protected function writeNodeTypeTo(WriterInterface $writer) { $writer->printf('%s ', $this->nodeType); return $this; } - protected function outputStereotypesTo(WriterInterface $writer) + protected function writeStereotypesTo(WriterInterface $writer) { foreach($this->stereotypes as $stereotype) { $writer->printf(' <<%s>>', $stereotype); @@ -134,12 +134,12 @@ class BaseNode implements NodeInterface return $this; } - protected function outputAttributesTo(WriterInterface $writer) + protected function writeAttributesTo(WriterInterface $writer) { return $this; } - protected function outputMethodsTo(WriterInterface $writer) + protected function writeMethodsTo(WriterInterface $writer) { return $this; } diff --git a/Writer/WritableInterface.php b/Writer/WritableInterface.php index 50fa5aacddc2fdab276e20601a36241d3c374077..fd27210f57f38450346f5cab66ba12d9f9465618 100644 --- a/Writer/WritableInterface.php +++ b/Writer/WritableInterface.php @@ -19,5 +19,5 @@ interface WritableInterface /** * @param WriterInterface $writer */ - public function outputTo(WriterInterface $writer); + public function writeTo(WriterInterface $writer); } diff --git a/Writer/WritableNodeInterface.php b/Writer/WritableNodeInterface.php index cc89d2803e92b1cd761adfe963d45616382931e4..957cfc617a98f37524f9c3fe49ed250f6b05a46e 100644 --- a/Writer/WritableNodeInterface.php +++ b/Writer/WritableNodeInterface.php @@ -19,5 +19,5 @@ interface WritableNodeInterface extends WritableInterface /** * @param WriterInterface $writer */ - public function outputAliasTo(WriterInterface $writer); + public function writeAliasTo(WriterInterface $writer); }