Skip to content

Commit 507ee2e

Browse files
author
Phil Sturgeon
committed
Converted this library from FuelPHP, which was based on v1.0 but improved significantly.
1 parent 382c490 commit 507ee2e

File tree

6 files changed

+432
-187
lines changed

6 files changed

+432
-187
lines changed

README

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.markdown

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# CodeIgniter-CLI
2+
3+
Interact with the command line by accepting input options, parameters and output text.
4+
5+
## History
6+
7+
This library was originally written in 2009 and was... alright. Now it has been totally rewritten based on the FuelPHP CLI library I wrote, which was based on this. MADNESS!
8+
9+
## Requirements
10+
11+
* CodeIgniter 2.0.x
12+
13+
## Examples
14+
15+
// Output "Hello World" to the CLI
16+
$this->cli->write('Hello World!');
17+
18+
// Waits for any key press
19+
$this->cli->prompt();
20+
21+
// Takes any input
22+
$color = $this->cli->prompt('What is your favorite color?');
23+
24+
// Takes any input, but offers default
25+
$color = $this->cli->prompt('What is your favorite color?', 'white');
26+
27+
// Will only accept the options in the array
28+
$ready = $this->cli->prompt('Are you ready?', array('y','n'));
29+
30+
$this->cli->write('Loading...');
31+
$this->cli->wait(5, true);

config/autoload.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?php
2+
3+
# Load the template library when the spark is loaded
4+
$autoload['libraries'] = array('cli');

libraries/CLI.php

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)