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
►
Helper
►
Input
▼
Output
►
ConsoleOutput.php
►
NullOutput.php
►
Output.php
►
OutputInterface.php
►
StreamOutput.php
►
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
StreamOutput.php
Ir para a documentação deste ficheiro.
1
<?php
2
3
namespace
Symfony\Component\Console\Output
;
4
5
/*
6
* This file is part of the Symfony framework.
7
*
8
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
9
*
10
* This source file is subject to the MIT license that is bundled
11
* with this source code in the file LICENSE.
12
*/
13
27
class
StreamOutput
extends
Output
28
{
29
protected
$stream
;
30
40
public
function
__construct
(
$stream
,
$verbosity
= self::VERBOSITY_NORMAL,
$decorated
=
null
)
41
{
42
if
(!is_resource(
$stream
) ||
'stream'
!== get_resource_type(
$stream
)) {
43
throw
new \InvalidArgumentException(
'The StreamOutput class needs a stream as its first argument.'
);
44
}
45
46
$this->stream =
$stream
;
47
48
if
(
null
===
$decorated
) {
49
$decorated
= $this->
hasColorSupport
(
$decorated
);
50
}
51
52
parent::__construct(
$verbosity
,
$decorated
);
53
}
40
public
function
__construct
(
$stream
,
$verbosity
= self::VERBOSITY_NORMAL,
$decorated
=
null
) {
…
}
54
60
public
function
getStream
()
61
{
62
return
$this->stream
;
63
}
60
public
function
getStream
() {
…
}
64
73
public
function
doWrite
($message, $newline)
74
{
75
if
(
false
=== @fwrite($this->stream, $message.($newline ? PHP_EOL :
''
))) {
76
// @codeCoverageIgnoreStart
77
// should never happen
78
throw
new \RuntimeException(
'Unable to write output.'
);
79
// @codeCoverageIgnoreEnd
80
}
81
82
flush();
83
}
73
public
function
doWrite
($message, $newline) {
…
}
84
95
protected
function
hasColorSupport
()
96
{
97
// @codeCoverageIgnoreStart
98
if
(DIRECTORY_SEPARATOR ==
'\\'
) {
99
return
false
!== getenv(
'ANSICON'
);
100
}
else
{
101
return
function_exists(
'posix_isatty'
) && @posix_isatty($this->stream);
102
}
103
// @codeCoverageIgnoreEnd
104
}
95
protected
function
hasColorSupport
() {
…
}
105
}
27
class
StreamOutput
extends
Output
{
…
};
Symfony\Component\Console\Output\Output
Definição
Output.php:26
Symfony\Component\Console\Output\Output\$decorated
$decorated
Definição
Output.php:36
Symfony\Component\Console\Output\Output\$verbosity
$verbosity
Definição
Output.php:35
Symfony\Component\Console\Output\StreamOutput
Definição
StreamOutput.php:28
Symfony\Component\Console\Output\StreamOutput\getStream
getStream()
Definição
StreamOutput.php:60
Symfony\Component\Console\Output\StreamOutput\hasColorSupport
hasColorSupport()
Definição
StreamOutput.php:95
Symfony\Component\Console\Output\StreamOutput\__construct
__construct($stream, $verbosity=self::VERBOSITY_NORMAL, $decorated=null)
Definição
StreamOutput.php:40
Symfony\Component\Console\Output\StreamOutput\$stream
$stream
Definição
StreamOutput.php:29
Symfony\Component\Console\Output\StreamOutput\doWrite
doWrite($message, $newline)
Definição
StreamOutput.php:73
Symfony\Component\Console\Output
Definição
ConsoleOutput.php:3
classes
extensions
doctrine-dbal
Doctrine
Symfony
Component
Console
Output
StreamOutput.php
Gerado por
1.10.0