MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
ApplicationTester.php
Ir para a documentação deste ficheiro.
1
<?php
2
3
namespace
Symfony\Component\Console\Tester
;
4
5
use
Symfony\Component\Console\Application
;
6
use
Symfony\Component\Console\Input\ArrayInput
;
7
use
Symfony\Component\Console\Output\StreamOutput
;
8
9
/*
10
* This file is part of the Symfony framework.
11
*
12
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
13
*
14
* This source file is subject to the MIT license that is bundled
15
* with this source code in the file LICENSE.
16
*/
17
21
class
ApplicationTester
22
{
23
protected
$application
;
24
protected
$display
;
25
protected
$input
;
26
protected
$output
;
27
33
public
function
__construct
(
Application
$application
)
34
{
35
$this->application =
$application
;
36
}
37
50
public
function
run
(array
$input
, $options = array())
51
{
52
$this->input =
new
ArrayInput
(
$input
);
53
if
(isset($options[
'interactive'
])) {
54
$this->input->setInteractive($options[
'interactive'
]);
55
}
56
57
$this->output =
new
StreamOutput
(fopen(
'php://memory'
,
'w'
,
false
));
58
if
(isset($options[
'decorated'
])) {
59
$this->output->setDecorated($options[
'decorated'
]);
60
}
61
if
(isset($options[
'verbosity'
])) {
62
$this->output->setVerbosity($options[
'verbosity'
]);
63
}
64
65
$ret = $this->application->run($this->input, $this->output);
66
67
rewind($this->output->getStream());
68
69
return
$this->display = stream_get_contents($this->output->getStream());
70
}
71
77
public
function
getDisplay
()
78
{
79
return
$this->display
;
80
}
81
87
public
function
getInput
()
88
{
89
return
$this->input
;
90
}
91
97
public
function
getOutput
()
98
{
99
return
$this->output
;
100
}
101
}
Symfony\Component\Console\Application
Definição
Application.php:46
Symfony\Component\Console\Input\ArrayInput
Definição
ArrayInput.php:24
Symfony\Component\Console\Output\StreamOutput
Definição
StreamOutput.php:28
Symfony\Component\Console\Tester\ApplicationTester
Definição
ApplicationTester.php:22
Symfony\Component\Console\Tester\ApplicationTester\__construct
__construct(Application $application)
Definição
ApplicationTester.php:33
Symfony\Component\Console\Tester\ApplicationTester\getInput
getInput()
Definição
ApplicationTester.php:87
Symfony\Component\Console\Tester\ApplicationTester\$application
$application
Definição
ApplicationTester.php:23
Symfony\Component\Console\Tester\ApplicationTester\$input
$input
Definição
ApplicationTester.php:25
Symfony\Component\Console\Tester\ApplicationTester\$output
$output
Definição
ApplicationTester.php:26
Symfony\Component\Console\Tester\ApplicationTester\getDisplay
getDisplay()
Definição
ApplicationTester.php:77
Symfony\Component\Console\Tester\ApplicationTester\run
run(array $input, $options=array())
Definição
ApplicationTester.php:50
Symfony\Component\Console\Tester\ApplicationTester\$display
$display
Definição
ApplicationTester.php:24
Symfony\Component\Console\Tester\ApplicationTester\getOutput
getOutput()
Definição
ApplicationTester.php:97
Symfony\Component\Console\Tester
Definição
ApplicationTester.php:3
classes
extensions
doctrine-dbal
Doctrine
Symfony
Component
Console
Tester
ApplicationTester.php
Gerado por
1.10.0