[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) {
|
||||
$data['tags'] = array();
|
||||
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'])) {
|
||||
foreach ($definition->getTags() as $tagName => $tagData) {
|
||||
foreach ($tagData as $parameters) {
|
||||
|
@ -275,6 +275,15 @@ class TextDescriptor extends Descriptor
|
||||
}
|
||||
$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('Synthetic', $definition->isSynthetic() ? 'yes' : 'no');
|
||||
$tableRows[] = array('Lazy', $definition->isLazy() ? 'yes' : 'no');
|
||||
|
@ -360,6 +360,15 @@ class XmlDescriptor extends Descriptor
|
||||
|
||||
$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) {
|
||||
$tags = $definition->getTags();
|
||||
|
||||
|
@ -115,6 +115,7 @@ class ObjectsProvider
|
||||
->addTag('tag1', array('attr1' => 'val1', 'attr2' => 'val2'))
|
||||
->addTag('tag1', array('attr3' => 'val3'))
|
||||
->addTag('tag2')
|
||||
->addMethodCall('setMailer', array(new Reference('mailer')))
|
||||
->setFactory(array(new Reference('factory.service'), 'get')),
|
||||
);
|
||||
}
|
||||
|
@ -47,6 +47,9 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"calls": [
|
||||
"setMailer"
|
||||
],
|
||||
"autowire": false,
|
||||
"autowiring_types": []
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ definition_2
|
||||
- File: `/path/to/file`
|
||||
- Factory Service: `factory.service`
|
||||
- Factory Method: `get`
|
||||
- Call: `setMailer`
|
||||
- Tag: `tag1`
|
||||
- Attr1: val1
|
||||
- Attr2: val2
|
||||
|
@ -7,6 +7,9 @@
|
||||
</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">
|
||||
<factory service="factory.service" method="get"/>
|
||||
<calls>
|
||||
<call method="setMailer"/>
|
||||
</calls>
|
||||
<tags>
|
||||
<tag name="tag1">
|
||||
<parameter name="attr1">val1</parameter>
|
||||
|
@ -31,6 +31,9 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"calls": [
|
||||
"setMailer"
|
||||
],
|
||||
"autowire": false,
|
||||
"autowiring_types": []
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ definition_2
|
||||
- File: `/path/to/file`
|
||||
- Factory Service: `factory.service`
|
||||
- Factory Method: `get`
|
||||
- Call: `setMailer`
|
||||
- Tag: `tag1`
|
||||
- Attr1: val1
|
||||
- Attr2: val2
|
||||
|
@ -2,6 +2,9 @@
|
||||
<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">
|
||||
<factory service="factory.service" method="get"/>
|
||||
<calls>
|
||||
<call method="setMailer"/>
|
||||
</calls>
|
||||
<tags>
|
||||
<tag name="tag1">
|
||||
<parameter name="attr1">val1</parameter>
|
||||
|
@ -8,6 +8,9 @@
|
||||
"shared": true,
|
||||
"abstract": false,
|
||||
"file": "\/path\/to\/file",
|
||||
"calls": [
|
||||
"setMailer"
|
||||
],
|
||||
"factory_service": "factory.service",
|
||||
"factory_method": "get",
|
||||
"autowire": false,
|
||||
@ -23,6 +26,9 @@
|
||||
"shared": true,
|
||||
"abstract": false,
|
||||
"file": "\/path\/to\/file",
|
||||
"calls": [
|
||||
"setMailer"
|
||||
],
|
||||
"factory_service": "factory.service",
|
||||
"factory_method": "get",
|
||||
"autowire": false,
|
||||
|
@ -17,6 +17,7 @@ definition_2
|
||||
- File: `/path/to/file`
|
||||
- Factory Service: `factory.service`
|
||||
- Factory Method: `get`
|
||||
- Call: `setMailer`
|
||||
|
||||
|
||||
tag2
|
||||
@ -35,3 +36,4 @@ definition_2
|
||||
- File: `/path/to/file`
|
||||
- Factory Service: `factory.service`
|
||||
- Factory Method: `get`
|
||||
- Call: `setMailer`
|
||||
|
@ -3,11 +3,17 @@
|
||||
<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">
|
||||
<factory service="factory.service" method="get"/>
|
||||
<calls>
|
||||
<call method="setMailer"/>
|
||||
</calls>
|
||||
</definition>
|
||||
</tag>
|
||||
<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">
|
||||
<factory service="factory.service" method="get"/>
|
||||
<calls>
|
||||
<call method="setMailer"/>
|
||||
</calls>
|
||||
</definition>
|
||||
</tag>
|
||||
</container>
|
||||
|
@ -29,6 +29,9 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"calls": [
|
||||
"setMailer"
|
||||
],
|
||||
"autowire": false,
|
||||
"autowiring_types": []
|
||||
}
|
||||
|
@ -8,9 +8,10 @@
|
||||
- File: `/path/to/file`
|
||||
- Factory Service: `factory.service`
|
||||
- Factory Method: `get`
|
||||
- Call: `setMailer`
|
||||
- Tag: `tag1`
|
||||
- Attr1: val1
|
||||
- Attr2: val2
|
||||
- Tag: `tag1`
|
||||
- Attr3: val3
|
||||
- Tag: `tag2`
|
||||
- Tag: `tag2`
|
||||
|
@ -4,6 +4,7 @@
|
||||
Service ID -
|
||||
Class Full\Qualified\Class2
|
||||
Tags tag1 ([32mattr1[39m: val1, [32mattr2[39m: val2)tag1 ([32mattr3[39m: val3)tag2
|
||||
Calls setMailer
|
||||
Public no
|
||||
Synthetic yes
|
||||
Lazy no
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?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">
|
||||
<factory service="factory.service" method="get"/>
|
||||
<calls>
|
||||
<call method="setMailer"/>
|
||||
</calls>
|
||||
<tags>
|
||||
<tag name="tag1">
|
||||
<parameter name="attr1">val1</parameter>
|
||||
|
Reference in New Issue
Block a user