robots.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?php
  2. /**
  3. * Fuel is a fast, lightweight, community driven PHP5 framework.
  4. *
  5. * @package Fuel
  6. * @version 1.5
  7. * @author Fuel Development Team
  8. * @license MIT License
  9. * @copyright 2010 - 2013 Fuel Development Team
  10. * @link http://fuelphp.com
  11. */
  12. namespace Fuel\Tasks;
  13. /**
  14. * Robot example task
  15. *
  16. * Ruthlessly stolen from the beareded Canadian sexy symbol:
  17. *
  18. * Derek Allard: http://derekallard.com/
  19. *
  20. * @package Fuel
  21. * @version 1.0
  22. * @author Phil Sturgeon
  23. */
  24. class Robots
  25. {
  26. /**
  27. * This method gets ran when a valid method name is not used in the command.
  28. *
  29. * Usage (from command line):
  30. *
  31. * php oil r robots
  32. *
  33. * or
  34. *
  35. * php oil r robots "Kill all Mice"
  36. *
  37. * @return string
  38. */
  39. public static function run($speech = null)
  40. {
  41. if ( ! isset($speech))
  42. {
  43. $speech = 'KILL ALL HUMANS!';
  44. }
  45. $eye = \Cli::color("*", 'red');
  46. return \Cli::color("
  47. \"{$speech}\"
  48. _____ /
  49. /_____\\", 'blue')."\n"
  50. .\Cli::color(" ____[\\", 'blue').$eye.\Cli::color('---', 'blue').$eye.\Cli::color('/]____', 'blue')."\n"
  51. .\Cli::color(" /\\ #\\ \\_____/ /# /\\
  52. / \\# \\_.---._/ #/ \\
  53. / /|\\ | | /|\\ \\
  54. /___/ | | | | | | \\___\\
  55. | | | | |---| | | | |
  56. |__| \\_| |_#_| |_/ |__|
  57. //\\\\ <\\ _//^\\\\_ /> //\\\\
  58. \\||/ |\\//// \\\\\\\\/| \\||/
  59. | | | |
  60. |---| |---|
  61. |---| |---|
  62. | | | |
  63. |___| |___|
  64. / \\ / \\
  65. |_____| |_____|
  66. |HHHHH| |HHHHH|", 'blue');
  67. }
  68. /**
  69. * An example method that is here just to show the various uses of tasks.
  70. *
  71. * Usage (from command line):
  72. *
  73. * php oil r robots:protect
  74. *
  75. * @return string
  76. */
  77. public static function protect()
  78. {
  79. $eye = \Cli::color("*", 'green');
  80. return \Cli::color("
  81. \"PROTECT ALL HUMANS\"
  82. _____ /
  83. /_____\\", 'blue')."\n"
  84. .\Cli::color(" ____[\\", 'blue').$eye.\Cli::color('---', 'blue').$eye.\Cli::color('/]____', 'blue')."\n"
  85. .\Cli::color(" /\\ #\\ \\_____/ /# /\\
  86. / \\# \\_.---._/ #/ \\
  87. / /|\\ | | /|\\ \\
  88. /___/ | | | | | | \\___\\
  89. | | | | |---| | | | |
  90. |__| \\_| |_#_| |_/ |__|
  91. //\\\\ <\\ _//^\\\\_ /> //\\\\
  92. \\||/ |\\//// \\\\\\\\/| \\||/
  93. | | | |
  94. |---| |---|
  95. |---| |---|
  96. | | | |
  97. |___| |___|
  98. / \\ / \\
  99. |_____| |_____|
  100. |HHHHH| |HHHHH|", 'blue');
  101. }
  102. }
  103. /* End of file tasks/robots.php */