forked from consolidation/robo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.robo
executable file
·35 lines (34 loc) · 898 Bytes
/
script.robo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env robo
<?php
/**
* Standalone Robo script.
*
* This file may be executed from the shell as if it were a
* bash script.
*
* Example:
*
* $ ./script.robo foo bar
* ➜ This is a standalone Robo script, bar
*
* Note that in order for this to work, the 'robo' script
* must be in your $PATH. Usually, this is done by installing
* Robo via 'composer global require', and placing ~/.composer/vendor/bin
* on your $PATH. Then, any Robo libraries that are also installed
* via 'composer global require' will be available for use in all
* Robo standalone scripts.
*/
class MyRoboScript extends \Robo\Tasks
{
/**
* Foo
*
* A demonstration of a command in a standalone Robo script.
*
* @param string $name a name that is printed.
*/
public function foo($name)
{
$this->say("This is a standalone Robo script, $name");
}
}