[FrameworkBundle] Calls support for debug:container
This commit is contained in:
parent
cef7e5b1b0
commit
b2d10382f7
@ -242,6 +242,14 @@ class JsonDescriptor extends Descriptor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$calls = $definition->getMethodCalls();
|
||||||
|
if (count($calls) > 0) {
|
||||||
|
$data['calls'] = array();
|
||||||
|
foreach ($calls as $callData) {
|
||||||
|
$data['calls'][] = $callData[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$omitTags) {
|
if (!$omitTags) {
|
||||||
$data['tags'] = array();
|
$data['tags'] = array();
|
||||||
if (count($definition->getTags())) {
|
if (count($definition->getTags())) {
|
||||||
|
@ -214,6 +214,11 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$calls = $definition->getMethodCalls();
|
||||||
|
foreach ($calls as $callData) {
|
||||||
|
$output .= "\n".'- Call: `'.$callData[0].'`';
|
||||||
|
}
|
||||||
|
|
||||||
if (!(isset($options['omit_tags']) && $options['omit_tags'])) {
|
if (!(isset($options['omit_tags']) && $options['omit_tags'])) {
|
||||||
foreach ($definition->getTags() as $tagName => $tagData) {
|
foreach ($definition->getTags() as $tagName => $tagData) {
|
||||||
foreach ($tagData as $parameters) {
|
foreach ($tagData as $parameters) {
|
||||||
|
@ -275,6 +275,15 @@ class TextDescriptor extends Descriptor
|
|||||||
}
|
}
|
||||||
$tableRows[] = array('Tags', $tagInformation);
|
$tableRows[] = array('Tags', $tagInformation);
|
||||||
|
|
||||||
|
$calls = $definition->getMethodCalls();
|
||||||
|
if (count($calls) > 0) {
|
||||||
|
$callInformation = [];
|
||||||
|
foreach ($calls as $call) {
|
||||||
|
$callInformation[] = $call[0];
|
||||||
|
}
|
||||||
|
$tableRows[] = array('Calls', implode(', ', $callInformation));
|
||||||
|
}
|
||||||
|
|
||||||
$tableRows[] = array('Public', $definition->isPublic() ? 'yes' : 'no');
|
$tableRows[] = array('Public', $definition->isPublic() ? 'yes' : 'no');
|
||||||
$tableRows[] = array('Synthetic', $definition->isSynthetic() ? 'yes' : 'no');
|
$tableRows[] = array('Synthetic', $definition->isSynthetic() ? 'yes' : 'no');
|
||||||
$tableRows[] = array('Lazy', $definition->isLazy() ? 'yes' : 'no');
|
$tableRows[] = array('Lazy', $definition->isLazy() ? 'yes' : 'no');
|
||||||
|
@ -360,6 +360,15 @@ class XmlDescriptor extends Descriptor
|
|||||||
|
|
||||||
$serviceXML->setAttribute('file', $definition->getFile());
|
$serviceXML->setAttribute('file', $definition->getFile());
|
||||||
|
|
||||||
|
$calls = $definition->getMethodCalls();
|
||||||
|
if (count($calls) > 0) {
|
||||||
|
$serviceXML->appendChild($callsXML = $dom->createElement('calls'));
|
||||||
|
foreach ($calls as $callData) {
|
||||||
|
$callsXML->appendChild($callXML = $dom->createElement('call'));
|
||||||
|
$callXML->setAttribute('method', $callData[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$omitTags) {
|
if (!$omitTags) {
|
||||||
$tags = $definition->getTags();
|
$tags = $definition->getTags();
|
||||||
|
|
||||||
|
@ -115,6 +115,7 @@ class ObjectsProvider
|
|||||||
->addTag('tag1', array('attr1' => 'val1', 'attr2' => 'val2'))
|
->addTag('tag1', array('attr1' => 'val1', 'attr2' => 'val2'))
|
||||||
->addTag('tag1', array('attr3' => 'val3'))
|
->addTag('tag1', array('attr3' => 'val3'))
|
||||||
->addTag('tag2')
|
->addTag('tag2')
|
||||||
|
->addMethodCall('setMailer', array(new Reference('mailer')))
|
||||||
->setFactory(array(new Reference('factory.service'), 'get')),
|
->setFactory(array(new Reference('factory.service'), 'get')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,9 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"calls": [
|
||||||
|
"setMailer"
|
||||||
|
],
|
||||||
"autowire": false,
|
"autowire": false,
|
||||||
"autowiring_types": []
|
"autowiring_types": []
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ definition_2
|
|||||||
- File: `/path/to/file`
|
- File: `/path/to/file`
|
||||||
- Factory Service: `factory.service`
|
- Factory Service: `factory.service`
|
||||||
- Factory Method: `get`
|
- Factory Method: `get`
|
||||||
|
- Call: `setMailer`
|
||||||
- Tag: `tag1`
|
- Tag: `tag1`
|
||||||
- Attr1: val1
|
- Attr1: val1
|
||||||
- Attr2: val2
|
- Attr2: val2
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
</definition>
|
</definition>
|
||||||
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
||||||
<factory service="factory.service" method="get"/>
|
<factory service="factory.service" method="get"/>
|
||||||
|
<calls>
|
||||||
|
<call method="setMailer"/>
|
||||||
|
</calls>
|
||||||
<tags>
|
<tags>
|
||||||
<tag name="tag1">
|
<tag name="tag1">
|
||||||
<parameter name="attr1">val1</parameter>
|
<parameter name="attr1">val1</parameter>
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"calls": [
|
||||||
|
"setMailer"
|
||||||
|
],
|
||||||
"autowire": false,
|
"autowire": false,
|
||||||
"autowiring_types": []
|
"autowiring_types": []
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ definition_2
|
|||||||
- File: `/path/to/file`
|
- File: `/path/to/file`
|
||||||
- Factory Service: `factory.service`
|
- Factory Service: `factory.service`
|
||||||
- Factory Method: `get`
|
- Factory Method: `get`
|
||||||
|
- Call: `setMailer`
|
||||||
- Tag: `tag1`
|
- Tag: `tag1`
|
||||||
- Attr1: val1
|
- Attr1: val1
|
||||||
- Attr2: val2
|
- Attr2: val2
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
<container>
|
<container>
|
||||||
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
||||||
<factory service="factory.service" method="get"/>
|
<factory service="factory.service" method="get"/>
|
||||||
|
<calls>
|
||||||
|
<call method="setMailer"/>
|
||||||
|
</calls>
|
||||||
<tags>
|
<tags>
|
||||||
<tag name="tag1">
|
<tag name="tag1">
|
||||||
<parameter name="attr1">val1</parameter>
|
<parameter name="attr1">val1</parameter>
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
"shared": true,
|
"shared": true,
|
||||||
"abstract": false,
|
"abstract": false,
|
||||||
"file": "\/path\/to\/file",
|
"file": "\/path\/to\/file",
|
||||||
|
"calls": [
|
||||||
|
"setMailer"
|
||||||
|
],
|
||||||
"factory_service": "factory.service",
|
"factory_service": "factory.service",
|
||||||
"factory_method": "get",
|
"factory_method": "get",
|
||||||
"autowire": false,
|
"autowire": false,
|
||||||
@ -23,6 +26,9 @@
|
|||||||
"shared": true,
|
"shared": true,
|
||||||
"abstract": false,
|
"abstract": false,
|
||||||
"file": "\/path\/to\/file",
|
"file": "\/path\/to\/file",
|
||||||
|
"calls": [
|
||||||
|
"setMailer"
|
||||||
|
],
|
||||||
"factory_service": "factory.service",
|
"factory_service": "factory.service",
|
||||||
"factory_method": "get",
|
"factory_method": "get",
|
||||||
"autowire": false,
|
"autowire": false,
|
||||||
|
@ -17,6 +17,7 @@ definition_2
|
|||||||
- File: `/path/to/file`
|
- File: `/path/to/file`
|
||||||
- Factory Service: `factory.service`
|
- Factory Service: `factory.service`
|
||||||
- Factory Method: `get`
|
- Factory Method: `get`
|
||||||
|
- Call: `setMailer`
|
||||||
|
|
||||||
|
|
||||||
tag2
|
tag2
|
||||||
@ -35,3 +36,4 @@ definition_2
|
|||||||
- File: `/path/to/file`
|
- File: `/path/to/file`
|
||||||
- Factory Service: `factory.service`
|
- Factory Service: `factory.service`
|
||||||
- Factory Method: `get`
|
- Factory Method: `get`
|
||||||
|
- Call: `setMailer`
|
||||||
|
@ -3,11 +3,17 @@
|
|||||||
<tag name="tag1">
|
<tag name="tag1">
|
||||||
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
||||||
<factory service="factory.service" method="get"/>
|
<factory service="factory.service" method="get"/>
|
||||||
|
<calls>
|
||||||
|
<call method="setMailer"/>
|
||||||
|
</calls>
|
||||||
</definition>
|
</definition>
|
||||||
</tag>
|
</tag>
|
||||||
<tag name="tag2">
|
<tag name="tag2">
|
||||||
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
<definition id="definition_2" class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
||||||
<factory service="factory.service" method="get"/>
|
<factory service="factory.service" method="get"/>
|
||||||
|
<calls>
|
||||||
|
<call method="setMailer"/>
|
||||||
|
</calls>
|
||||||
</definition>
|
</definition>
|
||||||
</tag>
|
</tag>
|
||||||
</container>
|
</container>
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"calls": [
|
||||||
|
"setMailer"
|
||||||
|
],
|
||||||
"autowire": false,
|
"autowire": false,
|
||||||
"autowiring_types": []
|
"autowiring_types": []
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
- File: `/path/to/file`
|
- File: `/path/to/file`
|
||||||
- Factory Service: `factory.service`
|
- Factory Service: `factory.service`
|
||||||
- Factory Method: `get`
|
- Factory Method: `get`
|
||||||
|
- Call: `setMailer`
|
||||||
- Tag: `tag1`
|
- Tag: `tag1`
|
||||||
- Attr1: val1
|
- Attr1: val1
|
||||||
- Attr2: val2
|
- Attr2: val2
|
||||||
- Tag: `tag1`
|
- Tag: `tag1`
|
||||||
- Attr3: val3
|
- Attr3: val3
|
||||||
- Tag: `tag2`
|
- Tag: `tag2`
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
Service ID -
|
Service ID -
|
||||||
Class Full\Qualified\Class2
|
Class Full\Qualified\Class2
|
||||||
Tags tag1 ([32mattr1[39m: val1, [32mattr2[39m: val2)tag1 ([32mattr3[39m: val3)tag2
|
Tags tag1 ([32mattr1[39m: val1, [32mattr2[39m: val2)tag1 ([32mattr3[39m: val3)tag2
|
||||||
|
Calls setMailer
|
||||||
Public no
|
Public no
|
||||||
Synthetic yes
|
Synthetic yes
|
||||||
Lazy no
|
Lazy no
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<definition class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
<definition class="Full\Qualified\Class2" public="false" synthetic="true" lazy="false" shared="true" abstract="false" autowired="false" file="/path/to/file">
|
||||||
<factory service="factory.service" method="get"/>
|
<factory service="factory.service" method="get"/>
|
||||||
|
<calls>
|
||||||
|
<call method="setMailer"/>
|
||||||
|
</calls>
|
||||||
<tags>
|
<tags>
|
||||||
<tag name="tag1">
|
<tag name="tag1">
|
||||||
<parameter name="attr1">val1</parameter>
|
<parameter name="attr1">val1</parameter>
|
||||||
|
Reference in New Issue
Block a user