Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
plantuml-bundle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Pôle IS
Bundles Symfony 2
plantuml-bundle
Commits
cb08244c
Commit
cb08244c
authored
May 17, 2016
by
Guillaume Perréal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
irstea:plantuml:render -vv affiche la configuration utilisée.
parent
2e1b1619
Changes
35
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
175 additions
and
6 deletions
+175
-6
Command/RenderCommand.php
Command/RenderCommand.php
+6
-0
Doctrine/AssociationDecorator.php
Doctrine/AssociationDecorator.php
+5
-0
Doctrine/DoctrineNamespace.php
Doctrine/DoctrineNamespace.php
+1
-0
Doctrine/EntityDecorator.php
Doctrine/EntityDecorator.php
+5
-0
Doctrine/EntityFinder.php
Doctrine/EntityFinder.php
+5
-0
Doctrine/FieldDecorator.php
Doctrine/FieldDecorator.php
+5
-0
Finder/ClassFinder.php
Finder/ClassFinder.php
+6
-0
Finder/FilteringFinder.php
Finder/FilteringFinder.php
+6
-0
Finder/FinderInterface.php
Finder/FinderInterface.php
+5
-1
Model/ClassFilterInterface.php
Model/ClassFilterInterface.php
+1
-1
Model/ClassVisitor.php
Model/ClassVisitor.php
+13
-0
Model/ClassVisitorInterface.php
Model/ClassVisitorInterface.php
+1
-1
Model/Decorator/AttributeDecorator.php
Model/Decorator/AttributeDecorator.php
+5
-0
Model/Decorator/CompositeDecorator.php
Model/Decorator/CompositeDecorator.php
+7
-0
Model/Decorator/FilteringDecorator.php
Model/Decorator/FilteringDecorator.php
+6
-0
Model/Decorator/InheritanceDecorator.php
Model/Decorator/InheritanceDecorator.php
+5
-0
Model/Decorator/InterfaceDecorator.php
Model/Decorator/InterfaceDecorator.php
+5
-0
Model/Decorator/MethodDecorator.php
Model/Decorator/MethodDecorator.php
+5
-0
Model/Decorator/NullDecorator.php
Model/Decorator/NullDecorator.php
+4
-0
Model/Decorator/TraitDecorator.php
Model/Decorator/TraitDecorator.php
+5
-0
Model/DecoratorInterface.php
Model/DecoratorInterface.php
+6
-1
Model/Filter/AbstractListFilter.php
Model/Filter/AbstractListFilter.php
+9
-0
Model/Filter/AcceptAllFilter.php
Model/Filter/AcceptAllFilter.php
+4
-0
Model/Filter/ClassFilter.php
Model/Filter/ClassFilter.php
+2
-0
Model/Filter/Composite/AbstractCompositeFilter.php
Model/Filter/Composite/AbstractCompositeFilter.php
+7
-0
Model/Filter/DirectoryFilter.php
Model/Filter/DirectoryFilter.php
+2
-0
Model/Filter/NamespaceFilter.php
Model/Filter/NamespaceFilter.php
+2
-0
Model/Graph.php
Model/Graph.php
+10
-0
Model/GraphInterface.php
Model/GraphInterface.php
+1
-1
Model/NamespaceInterface.php
Model/NamespaceInterface.php
+1
-1
Model/Namespace_/AbstractNamespace.php
Model/Namespace_/AbstractNamespace.php
+5
-0
Model/Namespace_/BundleNamespace.php
Model/Namespace_/BundleNamespace.php
+1
-0
Model/Namespace_/FlatNamespace.php
Model/Namespace_/FlatNamespace.php
+1
-0
Model/Namespace_/Php/RootNamespace.php
Model/Namespace_/Php/RootNamespace.php
+2
-0
Model/ToConfigInterface.php
Model/ToConfigInterface.php
+21
-0
No files found.
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
,
\
IteratorAggregat
e
interface
FinderInterface
extends
Traversable
,
IteratorAggregate
,
ToConfigInterfac
e
{
}
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'
;
}
}
Model/DecoratorInterface.php
View file @
cb08244c
...
...
@@ -14,7 +14,12 @@ use ReflectionClass;
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
DecoratorInterface
interface
DecoratorInterface
extends
ToConfigInterface
{
/**
* @param ReflectionClass $class
* @param NodeInterface $node
* @param ClassVisitorInterface $visitor
*/
public
function
decorate
(
ReflectionClass
$class
,
NodeInterface
$node
,
ClassVisitorInterface
$visitor
);
}
Model/Filter/AbstractListFilter.php
View file @
cb08244c
...
...
@@ -45,6 +45,15 @@ abstract class AbstractListFilter implements ClassFilterInterface
return
$this
->
notFound
;
}
public
function
toConfig
(
array
&
$conf
)
{
$key
=
$this
->
notFound
?
'exclude'
:
'include'
;
if
(
!
array_key_exists
(
$key
,
$conf
))
{
$conf
[
$key
]
=
[];
}
$conf
[
$key
][
static
::
CONF_TYPE
]
=
$this
->
allowed
;
}
/**
* @param string $value
* @return string
...
...
Model/Filter/AcceptAllFilter.php
View file @
cb08244c
...
...
@@ -24,4 +24,8 @@ class AcceptAllFilter implements ClassFilterInterface
{
return
true
;
}
public
function
toConfig
(
array
&
$conf
)
{
}
}
Model/Filter/ClassFilter.php
View file @
cb08244c
...
...
@@ -17,6 +17,8 @@ use ReflectionClass;
*/
class
ClassFilter
extends
AbstractListFilter
{
const
CONF_TYPE
=
'classes'
;
protected
function
extract
(
ReflectionClass
$class
)
{
return
$class
->
getName
();
...
...
Model/Filter/Composite/AbstractCompositeFilter.php
View file @
cb08244c
...
...
@@ -27,4 +27,11 @@ abstract class AbstractCompositeFilter implements ClassFilterInterface
{
$this
->
filters
=
$filters
;
}
public
function
toConfig
(
array
&
$conf
)
{
foreach
(
$this
->
filters
as
$filter
)
{
$filter
->
toConfig
(
$conf
);
}
}
}
Model/Filter/DirectoryFilter.php
View file @
cb08244c
...
...
@@ -17,6 +17,8 @@ use ReflectionClass;
*/
class
DirectoryFilter
extends
AbstractListFilter
{
const
CONF_TYPE
=
'directories'
;
protected
function
extract
(
ReflectionClass
$class
)
{
return
dirname
(
$class
->
getFileName
());
...
...
Model/Filter/NamespaceFilter.php
View file @
cb08244c
...
...
@@ -17,6 +17,8 @@ use ReflectionClass;
*/
class
NamespaceFilter
extends
AbstractListFilter
{
const
CONF_TYPE
=
'namespaces'
;
protected
function
extract
(
ReflectionClass
$class
)
{
return
$class
->
getNamespaceName
();
...
...
Model/Graph.php
View file @
cb08244c
...
...
@@ -48,4 +48,14 @@ class Graph implements GraphInterface
$writer
->
write
(
"@enduml@
\n
"
);
return
$this
;
}
/**
* @param array $conf
*/
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'sources'
]
=
[];
$this
->
finder
->
toConfig
(
$conf
[
'sources'
]);
$this
->
visitor
->
toConfig
(
$conf
);
}
}
Model/GraphInterface.php
View file @
cb08244c
...
...
@@ -14,7 +14,7 @@ use Irstea\PlantUmlBundle\Writer\WritableInterface;
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
GraphInterface
extends
WritableInterface
interface
GraphInterface
extends
WritableInterface
,
ToConfigInterface
{
/**
* @return void
...
...
Model/NamespaceInterface.php
View file @
cb08244c
...
...
@@ -14,7 +14,7 @@ use Irstea\PlantUmlBundle\Writer\WritableInterface;
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
NamespaceInterface
extends
WritableInterface
interface
NamespaceInterface
extends
WritableInterface
,
ToConfigInterface
{
/**
* @param string $namespaceName
...
...
Model/Namespace_/AbstractNamespace.php
View file @
cb08244c
...
...
@@ -54,4 +54,9 @@ abstract class AbstractNamespace implements WritableInterface, NamespaceInterfac
{
return
empty
(
$this
->
nodes
);
}
public
function
toConfig
(
array
&
$conf
)
{
$conf
[
'namespace'
]
=
static
::
CONF_TYPE
;
}
}
Model/Namespace_/BundleNamespace.php
View file @
cb08244c
...
...
@@ -15,6 +15,7 @@ namespace Irstea\PlantUmlBundle\Model\Namespace_;
*/
class
BundleNamespace
extends
MappedNamespace
{
const
CONF_TYPE
=
'bundles'
;
const
SEPARATOR
=
'::'
;
public
function
__construct
(
array
$bundles
)
...
...
Model/Namespace_/FlatNamespace.php
View file @
cb08244c
...
...
@@ -18,6 +18,7 @@ use Irstea\PlantUmlBundle\Writer\WriterInterface;
*/
class
FlatNamespace
extends
AbstractNamespace
{
const
CONF_TYPE
=
'flat'
;
const
SEPARATOR
=
'none'
;
/**
...
...
Model/Namespace_/Php/RootNamespace.php
View file @
cb08244c
...
...
@@ -18,6 +18,8 @@ use Irstea\PlantUmlBundle\Writer\WriterInterface;
*/
class
RootNamespace
extends
AbstractNamespace
{
const
CONF_TYPE
=
'php'
;
/**
* @var ArrowInterface[]
*/
...
...
Model/ToConfigInterface.php
0 → 100644
View file @
cb08244c
<?php
/*
* © 2016 IRSTEA
* Guillaume Perréal <guillaume.perreal@irstea.fr>
* Tous droits réservés.
*/
namespace
Irstea\PlantUmlBundle\Model
;
/**
*
* @author Guillaume Perréal <guillaume.perreal@irstea.fr>
*/
interface
ToConfigInterface
{
/**
* @param array $conf
*/
public
function
toConfig
(
array
&
$conf
);
}
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