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
cb08244c
Commit
cb08244c
authored
May 17, 2016
by
Guillaume Perréal
Browse files
irstea:plantuml:render -vv affiche la configuration utilisée.
parent
2e1b1619
Changes
35
Show whitespace changes
Inline
Side-by-side
Command/RenderCommand.php
View file @
cb08244c
...
...
@@ -66,6 +66,12 @@ class RenderCommand extends ContainerAwareCommand
{
$io
->
writeln
(
"Fichier de sortie: <comment>
$target
</comment>"
);
if
(
OutputInterface
::
VERBOSITY_VERY_VERBOSE
<=
$io
->
getVerbosity
())
{
$desc
=
[];
$graph
->
toConfig
(
$desc
);
$io
->
writeln
(
json_encode
(
$desc
,
JSON_PRETTY_PRINT
));
}
$io
->
write
(
"Exploration des classes: "
);
$graph
->
visitAll
();
$io
->
writeln
(
"<info>Ok</info>."
);
...
...
Doctrine/AssociationDecorator.php
View file @
cb08244c
...
...
@@ -81,4 +81,9 @@ class AssociationDecorator extends AbstractDoctrineDecorator
new
BaseArrow
(
$node
,
$target
,
"--"
,
$association
[
"fieldName"
]
.
" >"
,
$linkSource
,
$linkTarget
,
$sourceCardinality
,
$targetCardinality
)
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'associations'
;
}
}
Doctrine/DoctrineNamespace.php
View file @
cb08244c
...
...
@@ -15,6 +15,7 @@ namespace Irstea\PlantUmlBundle\Doctrine;
*/
class
DoctrineNamespace
extends
\
Irstea\PlantUmlBundle\Model\Namespace_\MappedNamespace
{
const
CONF_TYPE
=
'entities'
;
const
SEPARATOR
=
'::'
;
public
function
__construct
(
\
Doctrine\ORM\EntityManagerInterface
$em
)
...
...
Doctrine/EntityDecorator.php
View file @
cb08244c
...
...
@@ -34,4 +34,9 @@ class EntityDecorator extends AbstractDoctrineDecorator
$class
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'entity'
;
}
}
Doctrine/EntityFinder.php
View file @
cb08244c
...
...
@@ -36,4 +36,9 @@ class EntityFinder implements FinderInterface
}
return
new
ArrayIterator
(
$classes
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'type'
]
=
'entities'
;
}
}
Doctrine/FieldDecorator.php
View file @
cb08244c
...
...
@@ -50,4 +50,9 @@ class FieldDecorator extends AbstractDoctrineDecorator
$isIdentifier
));
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'fields'
;
}
}
Finder/ClassFinder.php
View file @
cb08244c
...
...
@@ -74,6 +74,12 @@ class ClassFinder implements FinderInterface
}
return
new
ArrayIterator
(
$this
->
classes
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'type'
]
=
'classes'
;
$conf
[
'directories'
]
=
$this
->
directories
;
}
}
function
irstea_plantmul_include
(
$filepath
)
...
...
Finder/FilteringFinder.php
View file @
cb08244c
...
...
@@ -38,4 +38,10 @@ class FilteringFinder implements FinderInterface
{
return
new
CallbackFilterIterator
(
$this
->
inner
->
getIterator
(),
[
$this
->
filter
,
'accept'
]);
}
public
function
toConfig
(
array
&
$conf
)
{
$this
->
inner
->
toConfig
(
$conf
);
$this
->
filter
->
toConfig
(
$conf
);
}
}
Finder/FinderInterface.php
View file @
cb08244c
...
...
@@ -8,10 +8,14 @@
namespace
Irstea\PlantUmlBundle\Finder
;
use
Irstea\PlantUmlBundle\Model\ToConfigInterface
;
use
IteratorAggregate
;
use
Traversable
;
/**
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
FinderInterface
extends
\
Traversable
,
\
IteratorAggregate
interface
FinderInterface
extends
Traversable
,
IteratorAggregate
,
ToConfigInterface
{
}
Model/ClassFilterInterface.php
View file @
cb08244c
...
...
@@ -14,7 +14,7 @@ use ReflectionClass;
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
ClassFilterInterface
interface
ClassFilterInterface
extends
ToConfigInterface
{
/**
* @param ReflectionClass $class
...
...
Model/ClassVisitor.php
View file @
cb08244c
...
...
@@ -123,4 +123,17 @@ class ClassVisitor implements ClassVisitorInterface
{
return
$this
->
rootNamespace
->
writeTo
(
$writer
);
}
/**
* @param array $conf
*/
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'layout'
]
=
[];
$conf
[
'decoration'
]
=
[];
$this
->
filter
->
toConfig
(
$conf
[
'layout'
]);
$this
->
rootNamespace
->
toConfig
(
$conf
[
'layout'
]);
$this
->
decorator
->
toConfig
(
$conf
[
'decoration'
]);
}
}
Model/ClassVisitorInterface.php
View file @
cb08244c
...
...
@@ -14,7 +14,7 @@ use Irstea\PlantUmlBundle\Writer\WritableInterface;
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
ClassVisitorInterface
extends
WritableInterface
interface
ClassVisitorInterface
extends
WritableInterface
,
ToConfigInterface
{
/**
* @param ReflectionClass|string
...
...
Model/Decorator/AttributeDecorator.php
View file @
cb08244c
...
...
@@ -44,4 +44,9 @@ class AttributeDecorator implements DecoratorInterface
);
}
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'attributes'
;
}
}
Model/Decorator/CompositeDecorator.php
View file @
cb08244c
...
...
@@ -43,4 +43,11 @@ class CompositeDecorator implements DecoratorInterface
}
return
$this
;
}
public
function
toConfig
(
array
&
$conf
)
{
foreach
(
$this
->
decorators
as
$decorator
)
{
$decorator
->
toConfig
(
$conf
);
}
}
}
Model/Decorator/FilteringDecorator.php
View file @
cb08244c
...
...
@@ -48,4 +48,10 @@ class FilteringDecorator implements DecoratorInterface
}
return
$this
;
}
public
function
toConfig
(
array
&
$conf
)
{
$this
->
filter
->
toConfig
(
$conf
);
$this
->
next
->
toConfig
(
$conf
);
}
}
Model/Decorator/InheritanceDecorator.php
View file @
cb08244c
...
...
@@ -34,4 +34,9 @@ class InheritanceDecorator extends AbstractRelationDecorator
{
return
new
ExtendsClass
(
$source
,
$target
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'inheritance'
;
}
}
Model/Decorator/InterfaceDecorator.php
View file @
cb08244c
...
...
@@ -51,4 +51,9 @@ class InterfaceDecorator extends AbstractRelationDecorator
{
return
new
ImplementsInterface
(
$source
,
$target
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'interfaces'
;
}
}
Model/Decorator/MethodDecorator.php
View file @
cb08244c
...
...
@@ -68,4 +68,9 @@ class MethodDecorator implements DecoratorInterface
$property
=
$class
->
getProperty
(
$name
);
return
$property
->
isStatic
()
==
$method
->
isStatic
();
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'methods'
;
}
}
Model/Decorator/NullDecorator.php
View file @
cb08244c
...
...
@@ -26,4 +26,8 @@ class NullDecorator implements DecoratorInterface
{
return
$this
;
}
public
function
toConfig
(
array
&
$conf
)
{
}
}
Model/Decorator/TraitDecorator.php
View file @
cb08244c
...
...
@@ -39,4 +39,9 @@ class TraitDecorator extends AbstractRelationDecorator
{
return
new
UsesTrait
(
$source
,
$target
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'decorators'
][]
=
'traits'
;
}
}
Prev
1
2
Next
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