Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pôle IS
Bundles Symfony 2
plantuml-bundle
Commits
5f91175d
Commit
5f91175d
authored
Mar 11, 2016
by
Guillaume Perréal
Browse files
WriterInterface::printf => WriterInterface::writeFormatted.
parent
a6e19bcf
Changes
6
Hide whitespace changes
Inline
Side-by-side
Model/Arrow/BaseArrow.php
View file @
5f91175d
...
@@ -55,14 +55,14 @@ class BaseArrow implements ArrowInterface
...
@@ -55,14 +55,14 @@ class BaseArrow implements ArrowInterface
protected
function
writeLabelTo
(
WriterInterface
$writer
)
protected
function
writeLabelTo
(
WriterInterface
$writer
)
{
{
if
(
$this
->
label
)
{
if
(
$this
->
label
)
{
$writer
->
p
ri
ntf
(
" : %s"
,
$this
->
label
);
$writer
->
w
ri
teFormatted
(
" : %s"
,
$this
->
label
);
}
}
return
$this
;
return
$this
;
}
}
protected
function
writeLinkTo
(
WriterInterface
$writer
)
protected
function
writeLinkTo
(
WriterInterface
$writer
)
{
{
$writer
->
p
ri
ntf
(
" %s "
,
$this
->
link
);
$writer
->
w
ri
teFormatted
(
" %s "
,
$this
->
link
);
return
$this
;
return
$this
;
}
}
}
}
Model/Namespace_/FlatNamespace.php
View file @
5f91175d
...
@@ -33,7 +33,7 @@ class FlatNamespace extends AbstractNamespace
...
@@ -33,7 +33,7 @@ class FlatNamespace extends AbstractNamespace
public
function
writeTo
(
WriterInterface
$writer
)
public
function
writeTo
(
WriterInterface
$writer
)
{
{
$writer
->
p
ri
ntf
(
"set namespaceSeparator %s
\n
"
,
static
::
SEPARATOR
);
$writer
->
w
ri
teFormatted
(
"set namespaceSeparator %s
\n
"
,
static
::
SEPARATOR
);
$this
$this
->
writeNodesTo
(
$writer
)
->
writeNodesTo
(
$writer
)
->
writeArrowsTo
(
$writer
);
->
writeArrowsTo
(
$writer
);
...
...
Model/Namespace_/Php/Namespace_.php
View file @
5f91175d
...
@@ -72,7 +72,7 @@ class Namespace_ extends AbstractNamespace
...
@@ -72,7 +72,7 @@ class Namespace_ extends AbstractNamespace
}
}
$writer
$writer
->
p
ri
ntf
(
"namespace %s {\n"
,
$this
->
name
)
->
w
ri
teFormatted
(
"namespace %s {\n"
,
$this
->
name
)
->
indent
();
->
indent
();
$this
$this
->
writeNodesTo
(
$writer
)
->
writeNodesTo
(
$writer
)
...
...
Model/Node/BaseNode.php
View file @
5f91175d
...
@@ -91,7 +91,7 @@ class BaseNode implements NodeInterface
...
@@ -91,7 +91,7 @@ class BaseNode implements NodeInterface
$this
$this
->
writeClassifiersTo
(
$writer
)
->
writeClassifiersTo
(
$writer
)
->
writeNodeTypeTo
(
$writer
);
->
writeNodeTypeTo
(
$writer
);
$writer
->
p
ri
ntf
(
'"%s" as %s'
,
$this
->
label
,
$this
->
id
);
$writer
->
w
ri
teFormatted
(
'"%s" as %s'
,
$this
->
label
,
$this
->
id
);
$this
$this
->
writeStereotypesTo
(
$writer
);
->
writeStereotypesTo
(
$writer
);
$writer
$writer
...
@@ -115,21 +115,21 @@ class BaseNode implements NodeInterface
...
@@ -115,21 +115,21 @@ class BaseNode implements NodeInterface
protected
function
writeClassifiersTo
(
WriterInterface
$writer
)
protected
function
writeClassifiersTo
(
WriterInterface
$writer
)
{
{
foreach
(
$this
->
classifiers
as
$classifier
)
{
foreach
(
$this
->
classifiers
as
$classifier
)
{
$writer
->
p
ri
ntf
(
'%s '
,
$classifier
);
$writer
->
w
ri
teFormatted
(
'%s '
,
$classifier
);
}
}
return
$this
;
return
$this
;
}
}
protected
function
writeNodeTypeTo
(
WriterInterface
$writer
)
protected
function
writeNodeTypeTo
(
WriterInterface
$writer
)
{
{
$writer
->
p
ri
ntf
(
'%s '
,
$this
->
nodeType
);
$writer
->
w
ri
teFormatted
(
'%s '
,
$this
->
nodeType
);
return
$this
;
return
$this
;
}
}
protected
function
writeStereotypesTo
(
WriterInterface
$writer
)
protected
function
writeStereotypesTo
(
WriterInterface
$writer
)
{
{
foreach
(
$this
->
stereotypes
as
$stereotype
)
{
foreach
(
$this
->
stereotypes
as
$stereotype
)
{
$writer
->
p
ri
ntf
(
' <<%s>>'
,
$stereotype
);
$writer
->
w
ri
teFormatted
(
' <<%s>>'
,
$stereotype
);
}
}
return
$this
;
return
$this
;
}
}
...
...
Writer/AbstractWriter.php
View file @
5f91175d
...
@@ -37,7 +37,7 @@ abstract class AbstractWriter implements WriterInterface
...
@@ -37,7 +37,7 @@ abstract class AbstractWriter implements WriterInterface
return
$this
;
return
$this
;
}
}
public
function
p
ri
ntf
(
$format
)
public
function
w
ri
teFormatted
(
$format
)
{
{
$args
=
func_get_args
();
$args
=
func_get_args
();
array_shift
(
$args
);
array_shift
(
$args
);
...
...
Writer/WriterInterface.php
View file @
5f91175d
...
@@ -37,5 +37,5 @@ interface WriterInterface
...
@@ -37,5 +37,5 @@ interface WriterInterface
* @param mixed ...
* @param mixed ...
* @return self
* @return self
*/
*/
public
function
p
ri
ntf
(
$fmt
);
public
function
w
ri
teFormatted
(
$fmt
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment