Skip to content

Instantly share code, notes, and snippets.

@gomasaba
Created February 2, 2014 14:19
Show Gist options
  • Save gomasaba/8769123 to your computer and use it in GitHub Desktop.
Save gomasaba/8769123 to your computer and use it in GitHub Desktop.
color_check_shell
<?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