Created
February 2, 2014 14:19
-
-
Save gomasaba/8769123 to your computer and use it in GitHub Desktop.
color_check_shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('Shell', 'Console'); | |
class ColorShell extends Shell { | |
public function main($command = null) { | |
$this->out("<emergency>emergency</emergency>"); | |
$this->out("<alert>alert</alert>"); | |
$this->out("<critical>critical</critical>"); | |
$this->out("<error>error</error>"); | |
$this->out("<warning>warning</warning>"); | |
$this->out("<info>info</info>"); | |
$this->out("<debug>debug</debug>"); | |
$this->out("<success>success</success>"); | |
$this->out("<comment>comment</comment>"); | |
$this->out("<question>question</question>"); | |
$this->out("<notice>notice</notice>"); | |
//独自でスタイルを作る | |
$this->stdout->styles('hoge', array('text' => 'white','background' => 'red')); | |
$this->out("<hoge>独自でスタイルを作る</hoge>"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment