MIOLO20
Toggle main menu visibility
Página principal
Estruturas de dados
Estruturas de dados
Hierarquia de classes
Campos de dados
Tudo
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Funções
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variáveis
$
a
b
c
d
e
f
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Ficheiros
Lista de ficheiros
Globais
Tudo
$
_
a
c
d
e
f
g
i
l
m
o
p
r
s
u
Funções
Variáveis
$
_
c
e
f
l
m
o
p
s
Exemplos
▼
MIOLO20
►
Estruturas de dados
▼
Ficheiros
▼
Lista de ficheiros
▼
classes
►
contrib
►
database
►
doc
▼
extensions
▼
doctrine-dbal
▼
Doctrine
►
Common
►
DBAL
▼
Symfony
▼
Component
▼
Console
▼
Command
►
Command.php
►
HelpCommand.php
►
ListCommand.php
►
Helper
►
Input
►
Output
►
Tester
►
Application.php
►
Shell.php
►
Yaml
►
jasper
►
spaw
►
class.phpmailer.php
►
class.smtp.php
►
cpaint.inc.php
►
cpaint_proxy.php
►
ezpdf
►
flow
►
interfaces
►
model
►
persistence
►
pslib
►
security
►
services
►
tests
►
ui
►
utils
►
compatibility.class
►
miolo.class
►
Globais
►
Exemplos
•
Tudo
Estruturas de dados
Namespaces
Ficheiros
Funções
Variáveis
Carregando...
Procurando...
Nenhuma entrada encontrada
HelpCommand.php
Ir para a documentação deste ficheiro.
1
<?php
2
3
namespace
Symfony\Component\Console\Command
;
4
5
use
Symfony\Component\Console\Input\InputArgument
;
6
use
Symfony\Component\Console\Input\InputOption
;
7
use
Symfony\Component\Console\Input\InputInterface
;
8
use
Symfony\Component\Console\Output\OutputInterface
;
9
use
Symfony\Component\Console\Output\Output
;
10
use
Symfony\Component\Console\Command\Command
;
11
12
/*
13
* This file is part of the Symfony framework.
14
*
15
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
16
*
17
* This source file is subject to the MIT license that is bundled
18
* with this source code in the file LICENSE.
19
*/
20
26
class
HelpCommand
extends
Command
27
{
28
protected
$command
;
29
33
protected
function
configure
()
34
{
35
$this->ignoreValidationErrors =
true
;
36
37
$this
38
->setDefinition(array(
39
new
InputArgument
(
'command_name'
, InputArgument::OPTIONAL,
'The command name'
,
'help'
),
40
new
InputOption
(
'xml'
,
null
, InputOption::VALUE_NONE,
'To output help as XML'
),
41
))
42
->setName(
'help'
)
43
->setAliases(array(
'?'
))
44
->setDescription(
'Displays help for a command'
)
45
->setHelp(<<<EOF
46
The <info>help</info> command displays help
for
a given command:
47
48
<info>./
symfony
help list</info>
49
50
You can also output the help as XML by
using
the <comment>--xml</comment> option:
51
52
<info>./
symfony
help --xml list</info>
53
EOF
54
);
55
}
33
protected
function
configure
() {
…
}
56
57
public
function
setCommand
(
Command
$command
)
58
{
59
$this->command =
$command
;
60
}
57
public
function
setCommand
(
Command
$command
) {
…
}
61
65
protected
function
execute
(
InputInterface
$input,
OutputInterface
$output)
66
{
67
if
(
null
=== $this->command) {
68
$this->command = $this->application->get($input->
getArgument
(
'command_name'
));
69
}
70
71
if
($input->
getOption
(
'xml'
)) {
72
$output->writeln($this->command->asXml(), Output::OUTPUT_RAW);
73
}
else
{
74
$output->writeln($this->command->asText());
75
}
76
}
65
protected
function
execute
(
InputInterface
$input,
OutputInterface
$output) {
…
}
77
}
26
class
HelpCommand
extends
Command
{
…
};
Symfony\Component\Console\Command\Command
Definição
Command.php:27
Symfony\Component\Console\Command\HelpCommand
Definição
HelpCommand.php:27
Symfony\Component\Console\Command\HelpCommand\setCommand
setCommand(Command $command)
Definição
HelpCommand.php:57
Symfony\Component\Console\Command\HelpCommand\$command
$command
Definição
HelpCommand.php:28
Symfony\Component\Console\Command\HelpCommand\configure
configure()
Definição
HelpCommand.php:33
Symfony\Component\Console\Command\HelpCommand\execute
execute(InputInterface $input, OutputInterface $output)
Definição
HelpCommand.php:65
Symfony\Component\Console\Input\InputArgument
Definição
InputArgument.php:20
Symfony\Component\Console\Input\InputOption
Definição
InputOption.php:20
Symfony\Component\Console\Output\Output
Definição
Output.php:26
Symfony\Component\Console\Input\InputInterface
Definição
InputInterface.php:20
Symfony\Component\Console\Input\InputInterface\getOption
getOption($name)
Symfony\Component\Console\Input\InputInterface\getArgument
getArgument($name)
Symfony\Component\Console\Output\OutputInterface
Definição
OutputInterface.php:20
Symfony\Component\Console\Command
Definição
Command.php:3
symfony
classes
extensions
doctrine-dbal
Doctrine
Symfony
Component
Console
Command
HelpCommand.php
Gerado por
1.10.0