Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
fc5045fd
Commit
fc5045fd
authored
May 08, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Copy paste error console/Controller
also naming of formatString -> ansiFormat
parent
ed74636a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Controller.php
framework/console/Controller.php
+7
-7
No files found.
framework/console/Controller.php
View file @
fc5045fd
...
...
@@ -128,13 +128,13 @@ class Controller extends \yii\base\Controller
*
* Example:
* ~~~
* $this->
formatString
('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
* $this->
ansiFormat
('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
* ~~~
*
* @param string $string the string to be formatted
* @return string
*/
public
function
formatString
(
$string
)
public
function
ansiFormat
(
$string
)
{
if
(
$this
->
ansi
===
true
||
$this
->
ansi
===
null
&&
Console
::
streamSupportsAnsiColors
(
STDOUT
))
{
$args
=
func_get_args
();
...
...
@@ -202,9 +202,9 @@ class Controller extends \yii\base\Controller
public
function
input
(
$prompt
=
null
)
{
if
(
isset
(
$prompt
))
{
static
::
stdout
(
$prompt
);
$this
->
stdout
(
$prompt
);
}
return
static
::
stdin
();
return
Console
::
stdin
();
}
/**
...
...
@@ -217,7 +217,7 @@ class Controller extends \yii\base\Controller
*/
public
function
output
(
$text
=
null
)
{
return
static
::
stdout
(
$text
.
PHP_EOL
);
return
$this
->
stdout
(
$text
.
PHP_EOL
);
}
/**
...
...
@@ -230,7 +230,7 @@ class Controller extends \yii\base\Controller
*/
public
function
error
(
$text
=
null
)
{
return
static
::
stderr
(
$text
.
PHP_EOL
);
return
$this
->
stderr
(
$text
.
PHP_EOL
);
}
/**
...
...
@@ -276,7 +276,7 @@ class Controller extends \yii\base\Controller
*
* @return string An option character the user chose
*/
public
static
function
select
(
$prompt
,
$options
=
array
())
public
function
select
(
$prompt
,
$options
=
array
())
{
return
Console
::
select
(
$prompt
,
$options
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment