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
Hide whitespace changes
Inline
Side-by-side
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
);
}
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