You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
113 lines
2.5 KiB
113 lines
2.5 KiB
7 years ago
|
<?php
|
||
|
/**
|
||
|
* Fuel is a fast, lightweight, community driven PHP5 framework.
|
||
|
*
|
||
|
* @package Fuel
|
||
|
* @version 1.8
|
||
|
* @author Fuel Development Team
|
||
|
* @license MIT License
|
||
|
* @copyright 2010 - 2016 Fuel Development Team
|
||
|
* @link http://fuelphp.com
|
||
|
*/
|
||
|
|
||
|
namespace Fuel\Tasks;
|
||
|
|
||
|
/**
|
||
|
* Robot example task
|
||
|
*
|
||
|
* Ruthlessly stolen from the beareded Canadian sexy symbol:
|
||
|
*
|
||
|
* Derek Allard: http://derekallard.com/
|
||
|
*
|
||
|
* @package Fuel
|
||
|
* @version 1.0
|
||
|
* @author Phil Sturgeon
|
||
|
*/
|
||
|
|
||
|
class Robots
|
||
|
{
|
||
|
/**
|
||
|
* This method gets ran when a valid method name is not used in the command.
|
||
|
*
|
||
|
* Usage (from command line):
|
||
|
*
|
||
|
* php oil r robots
|
||
|
*
|
||
|
* or
|
||
|
*
|
||
|
* php oil r robots "Kill all Mice"
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public static function run($speech = null)
|
||
|
{
|
||
|
if ( ! isset($speech))
|
||
|
{
|
||
|
$speech = 'KILL ALL HUMANS!';
|
||
|
}
|
||
|
|
||
|
$eye = \Cli::color("*", 'red');
|
||
|
|
||
|
return \Cli::color("
|
||
|
\"{$speech}\"
|
||
|
_____ /
|
||
|
/_____\\", 'blue')."\n"
|
||
|
.\Cli::color(" ____[\\", 'blue').$eye.\Cli::color('---', 'blue').$eye.\Cli::color('/]____', 'blue')."\n"
|
||
|
.\Cli::color(" /\\ #\\ \\_____/ /# /\\
|
||
|
/ \\# \\_.---._/ #/ \\
|
||
|
/ /|\\ | | /|\\ \\
|
||
|
/___/ | | | | | | \\___\\
|
||
|
| | | | |---| | | | |
|
||
|
|__| \\_| |_#_| |_/ |__|
|
||
|
//\\\\ <\\ _//^\\\\_ /> //\\\\
|
||
|
\\||/ |\\//// \\\\\\\\/| \\||/
|
||
|
| | | |
|
||
|
|---| |---|
|
||
|
|---| |---|
|
||
|
| | | |
|
||
|
|___| |___|
|
||
|
/ \\ / \\
|
||
|
|_____| |_____|
|
||
|
|HHHHH| |HHHHH|", 'blue');
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* An example method that is here just to show the various uses of tasks.
|
||
|
*
|
||
|
* Usage (from command line):
|
||
|
*
|
||
|
* php oil r robots:protect
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public static function protect()
|
||
|
{
|
||
|
$eye = \Cli::color("*", 'green');
|
||
|
|
||
|
return \Cli::color("
|
||
|
\"PROTECT ALL HUMANS\"
|
||
|
_____ /
|
||
|
/_____\\", 'blue')."\n"
|
||
|
.\Cli::color(" ____[\\", 'blue').$eye.\Cli::color('---', 'blue').$eye.\Cli::color('/]____', 'blue')."\n"
|
||
|
.\Cli::color(" /\\ #\\ \\_____/ /# /\\
|
||
|
/ \\# \\_.---._/ #/ \\
|
||
|
/ /|\\ | | /|\\ \\
|
||
|
/___/ | | | | | | \\___\\
|
||
|
| | | | |---| | | | |
|
||
|
|__| \\_| |_#_| |_/ |__|
|
||
|
//\\\\ <\\ _//^\\\\_ /> //\\\\
|
||
|
\\||/ |\\//// \\\\\\\\/| \\||/
|
||
|
| | | |
|
||
|
|---| |---|
|
||
|
|---| |---|
|
||
|
| | | |
|
||
|
|___| |___|
|
||
|
/ \\ / \\
|
||
|
|_____| |_____|
|
||
|
|HHHHH| |HHHHH|", 'blue');
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* End of file tasks/robots.php */
|