mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adding success style.
Adding some additional formatting to the default welcome method.
This commit is contained in:
parent
b11f2bfb1f
commit
749e9c19d5
2 changed files with 6 additions and 4 deletions
|
@ -116,7 +116,8 @@ class ConsoleOutput {
|
|||
protected static $_styles = array(
|
||||
'error' => array('text' => 'red'),
|
||||
'warning' => array('text' => 'yellow'),
|
||||
'info' => array('text' => 'cyan')
|
||||
'info' => array('text' => 'cyan'),
|
||||
'success' => array('text' => 'green')
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -192,7 +192,7 @@ class Shell extends Object {
|
|||
protected function _welcome() {
|
||||
$this->Dispatch->clear();
|
||||
$this->out();
|
||||
$this->out('Welcome to CakePHP v' . Configure::version() . ' Console');
|
||||
$this->out('<info>Welcome to CakePHP v' . Configure::version() . ' Console</info>');
|
||||
$this->hr();
|
||||
$this->out('App : '. $this->params['app']);
|
||||
$this->out('Path: '. $this->params['working']);
|
||||
|
@ -345,10 +345,11 @@ class Shell extends Object {
|
|||
* Outputs a series of minus characters to the standard output, acts as a visual separator.
|
||||
*
|
||||
* @param integer $newlines Number of newlines to pre- and append
|
||||
* @param integer $width Width of the line, defaults to 63
|
||||
*/
|
||||
public function hr($newlines = 0) {
|
||||
public function hr($newlines = 0, $width = 63) {
|
||||
$this->out(null, $newlines);
|
||||
$this->out('---------------------------------------------------------------');
|
||||
$this->out(str_repeat('-', $width));
|
||||
$this->out(null, $newlines);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue