On this page
Class ProgressShellHelper
Create a progress bar using a supplied callback.
- BaseShellHelper
- ProgressShellHelper 
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Console/Helper/ProgressShellHelper.php
  
  License: MIT License
Location: Cake/Console/Helper/ProgressShellHelper.php
Properties summary
- 
    $_progressprotectedThe current progress.integer
- 
    $_totalprotectedThe total number of 'items' to progress through.integer
- 
    $_widthprotectedThe width of the bar.integer
Inherited Properties
Method Summary
- 
    draw() publicRender the progress bar based on the current state.
- 
    increment() publicIncrement the progress bar.
- 
    init() publicInitialize the progress bar for use.
- 
    output() publicOutput a progress bar.
Method Detail
increment()source public
increment( integer $num 1 )Increment the progress bar.
Parameters
- 
     integer $numoptional 1
- The amount of progress to advance by.
init()source public
init( array $args array() )Initialize the progress bar for use.
- totalThe total number of items in the progress bar. Defaults to 100.
- widthThe width of the progress bar. Defaults to 80.
Parameters
- 
     array $argsoptional array()
- The initialization data.
output()source public
output( array $args )Output a progress bar.
Takes a number of options to customize the behavior:
- totalThe total number of items in the progress bar. Defaults to 100.
- widthThe width of the progress bar. Defaults to 80.
- callbackThe callback that will be called in a loop to advance the progress bar.
Parameters
- 
     array $args
- The arguments/options to use when outputing the progress bar.
Throws
RuntimeExceptionMethods inherited from BaseShellHelper
__construct()source public
__construct( ConsoleOutput $consoleOutput , array $config array() )Constructor.
Parameters
- ConsoleOutput- $consoleOutput
- The ConsoleOutput instance to use.
- 
     array $configoptional array()
- The settings for this helper.
config()source public
config( null $config null )Initialize config & store config values
Parameters
- 
     null $configoptional null
- Config values to set
Returns
array|Properties detail
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
 https://api.cakephp.org/2.10/class-ProgressShellHelper.html