forked from CakeDC/progress_bar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
24 lines (22 loc) · 701 Bytes
/
README
File metadata and controls
24 lines (22 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
* CakePHP Progress Bar Shell Task
* Copyright (c) 2010 Matt Curry
* www.PseudoCoder.com
* http://github.com/mcurry/progress_bar
*
* @author Matt Curry <matt@pseudocoder.com>
* @license MIT
*
*/
/* Description */
A shell task for showing a simple progress bar.
/* Instructions */
1. Download the plugin to app/plugins/progress_bar.
2. Include the task in your shell.
var $tasks = array('ProgressBar');
3. Start the progress bar by calling ProgressBar::start with the total number of whatever you are processing.
$this->ProgressBar->start(count($loops));
4. Within each loop:
$this->ProgressBar->next();
Or to set it to any point:
$this->ProgressBar->set($done);