[FrameworkBundle] Removed the use of TableHelper

This commit is contained in:
Saro0h 2015-01-02 00:49:09 +01:00
parent b3b4f505a9
commit 08a5b5ac5a
35 changed files with 40 additions and 35 deletions

View File

@ -59,7 +59,7 @@ class TextDescriptor extends Descriptor
} }
$this->writeText($this->formatSection('router', 'Current routes')."\n", $options); $this->writeText($this->formatSection('router', 'Current routes')."\n", $options);
$this->renderTable($table, !(isset($options['raw_output']) && $options['raw_output'])); $table->render();
} }
/** /**
@ -109,7 +109,7 @@ class TextDescriptor extends Descriptor
} }
$this->writeText($this->formatSection('container', 'List of parameters')."\n", $options); $this->writeText($this->formatSection('container', 'List of parameters')."\n", $options);
$this->renderTable($table, !(isset($options['raw_output']) && $options['raw_output'])); $table->render();
} }
/** /**
@ -232,7 +232,7 @@ class TextDescriptor extends Descriptor
} }
} }
$this->renderTable($table); $table->render();
} }
/** /**
@ -302,6 +302,7 @@ class TextDescriptor extends Descriptor
$this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options); $this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options);
$registeredListeners = $eventDispatcher->getListeners($event); $registeredListeners = $eventDispatcher->getListeners($event);
if (null !== $event) { if (null !== $event) {
$this->writeText("\n"); $this->writeText("\n");
$table = new Table($this->getOutput()); $table = new Table($this->getOutput());
@ -312,7 +313,7 @@ class TextDescriptor extends Descriptor
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener))); $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener)));
} }
$this->renderTable($table, true); $table->render();
} else { } else {
ksort($registeredListeners); ksort($registeredListeners);
foreach ($registeredListeners as $eventListened => $eventListeners) { foreach ($registeredListeners as $eventListened => $eventListeners) {
@ -326,7 +327,7 @@ class TextDescriptor extends Descriptor
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener)));
} }
$this->renderTable($table, true); $table->render();
} }
} }
} }

View File

@ -1,2 +1,2 @@
- Service: `service_1` - Service: `service_1`
- Public: yes - Public: yes

View File

@ -1,2 +1,2 @@
- Service: `service_2` - Service: `service_2`
- Public: no - Public: no

View File

@ -32,4 +32,4 @@ alias_2
Services Services
-------- --------
- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` - `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`

View File

@ -1,5 +1,5 @@
<info>[container]</info> <comment>Public</comment> services <info>[container]</info> <comment>Public</comment> services
Service ID Class name Service ID  Class name 
alias_1 alias for "service_1" alias_1 alias for "service_1"
alias_2 alias for "service_2" alias_2 alias for "service_2"
definition_1 Full\Qualified\Class1 definition_1 Full\Qualified\Class1

View File

@ -47,4 +47,4 @@ alias_2
Services Services
-------- --------
- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` - `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder`

View File

@ -1,8 +1,7 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services <info>[container]</info> <comment>Public</comment> and <comment>private</comment> services
Service ID Class name Service ID  Class name 
alias_1 alias for "service_1" alias_1 alias for "service_1"
alias_2 alias for "service_2" alias_2 alias for "service_2"
definition_1 Full\Qualified\Class1 definition_1 Full\Qualified\Class1
definition_2 Full\Qualified\Class2 definition_2 Full\Qualified\Class2
service_container Symfony\Component\DependencyInjection\ContainerBuilder service_container Symfony\Component\DependencyInjection\ContainerBuilder

View File

@ -1,4 +1,4 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services with tag <info>tag1</info> <info>[container]</info> <comment>Public</comment> and <comment>private</comment> services with tag <info>tag1</info>
Service ID attr1 attr2 attr3 Class name Service ID  attr1 attr2 attr3 Class name 
definition_2 val1 val2 Full\Qualified\Class2 definition_2 val1 val2 Full\Qualified\Class2
" val3 " val3

View File

@ -1,2 +1,3 @@
- Type: `function` - Type: `function`
- Name: `array_key_exists` - Name: `array_key_exists`

View File

@ -1 +1 @@
array_key_exists() array_key_exists()

View File

@ -1,3 +1,4 @@
- Type: `function` - Type: `function`
- Name: `staticMethod` - Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`

View File

@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()

View File

@ -1,3 +1,4 @@
- Type: `function` - Type: `function`
- Name: `method` - Name: `method`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`

View File

@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method() Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method()

View File

@ -1,3 +1,4 @@
- Type: `function` - Type: `function`
- Name: `staticMethod` - Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`

View File

@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod()

View File

@ -1,3 +1,4 @@
- Type: `function` - Type: `function`
- Name: `staticMethod` - Name: `staticMethod`
- Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass`

View File

@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod() Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod()

View File

@ -1 +1,2 @@
- Type: `closure` - Type: `closure`

View File

@ -1,3 +1,3 @@
- Type: `object` - Type: `object`
- Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass`

View File

@ -1 +1 @@
Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke()

View File

@ -1,4 +1,4 @@
- Class: `Full\Qualified\Class1` - Class: `Full\Qualified\Class1`
- Scope: `container` - Scope: `container`
- Public: yes - Public: yes
- Synthetic: no - Synthetic: no

View File

@ -8,4 +8,4 @@
- Attr2: val2 - Attr2: val2
- Tag: `tag1` - Tag: `tag1`
- Attr3: val3 - Attr3: val3
- Tag: `tag2` - Tag: `tag2`

View File

@ -1,4 +1,4 @@
database_name database_name
============= =============
symfony symfony

View File

@ -4,4 +4,4 @@ Container parameters
- `array`: `[12,"Hello world!",true]` - `array`: `[12,"Hello world!",true]`
- `boolean`: `true` - `boolean`: `true`
- `integer`: `12` - `integer`: `12`
- `string`: `Hello world!` - `string`: `Hello world!`

View File

@ -1,7 +1,6 @@
<info>[container]</info> List of parameters <info>[container]</info> List of parameters
Parameter Value Parameter Value 
array [12,"Hello world!",true] array [12,"Hello world!",true]
boolean true boolean true
integer 12 integer 12
string Hello world! string Hello world!

View File

@ -6,4 +6,4 @@
- Defaults: - Defaults:
- `name`: Joseph - `name`: Joseph
- Requirements: - Requirements:
- `name`: [a-z]+ - `name`: [a-z]+

View File

@ -9,4 +9,4 @@
opt1: val1 opt1: val1
opt2: val2 opt2: val2
<comment>Path-Regex</comment> #^/hello(?:/(?P<name>[a-z]+))?$#s <comment>Path-Regex</comment> #^/hello(?:/(?P<name>[a-z]+))?$#s
<comment>Host-Regex</comment> #^localhost$#s <comment>Host-Regex</comment> #^localhost$#s

View File

@ -4,4 +4,4 @@
- Method: PUT|POST - Method: PUT|POST
- Class: Symfony\Component\Routing\Route - Class: Symfony\Component\Routing\Route
- Defaults: NONE - Defaults: NONE
- Requirements: NONE - Requirements: NONE

View File

@ -9,4 +9,4 @@
opt1: val1 opt1: val1
opt2: val2 opt2: val2
<comment>Path-Regex</comment> #^/name/add$#s <comment>Path-Regex</comment> #^/name/add$#s
<comment>Host-Regex</comment> #^localhost$#s <comment>Host-Regex</comment> #^localhost$#s

View File

@ -22,3 +22,4 @@ route_2
- Class: Symfony\Component\Routing\Route - Class: Symfony\Component\Routing\Route
- Defaults: NONE - Defaults: NONE
- Requirements: NONE - Requirements: NONE

View File

@ -1,5 +1,4 @@
<info>[router]</info> Current routes <info>[router]</info> Current routes
Name Method Scheme Host Path Name  Method  Scheme  Host  Path 
route_1 GET|HEAD http|https localhost /hello/{name} route_1 GET|HEAD http|https localhost /hello/{name}
route_2 PUT|POST http|https localhost /name/add route_2 PUT|POST http|https localhost /name/add

View File

@ -33,7 +33,7 @@
}, },
"require-dev": { "require-dev": {
"symfony/browser-kit": "~2.4|~3.0.0", "symfony/browser-kit": "~2.4|~3.0.0",
"symfony/console": "~2.5|~3.0.0", "symfony/console": "~2.6|~3.0.0",
"symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
"symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0",
"symfony/finder": "~2.0,>=2.0.5|~3.0.0", "symfony/finder": "~2.0,>=2.0.5|~3.0.0",