CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.9 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.9
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper
  • None

Classes

  • BaseShellHelper
  • ConsoleOutputStub
  • ProgressShellHelper
  • TableShellHelper

Class ProgressShellHelper

Create a progress bar using a supplied callback.

BaseShellHelper
Extended by ProgressShellHelper
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/Helper/ProgressShellHelper.php

Properties summary

  • $_progress protected
    integer
    The current progress.
  • $_total protected
    integer
    The total number of 'items' to progress through.
  • $_width protected
    integer
    The width of the bar.

Inherited Properties

  • _config, _configInitialized, _consoleOutput, _defaultConfig

Method Summary

  • draw() public
    Render the progress bar based on the current state.
  • increment() public
    Increment the progress bar.
  • init() public
    Initialize the progress bar for use.
  • output() public
    Output a progress bar.

Method Detail

draw() public ¶

draw( )

Render the progress bar based on the current state.

increment() public ¶

increment( integer $num = 1 )

Increment the progress bar.

Parameters
integer $num optional 1
The amount of progress to advance by.

init() public ¶

init( array $args = array() )

Initialize the progress bar for use.

  • total The total number of items in the progress bar. Defaults to 100.
  • width The width of the progress bar. Defaults to 80.
Parameters
array $args optional array()
The initialization data.

output() public ¶

output( array $args )

Output a progress bar.

Takes a number of options to customize the behavior:

  • total The total number of items in the progress bar. Defaults to 100.
  • width The width of the progress bar. Defaults to 80.
  • callback The 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
RuntimeException

Methods inherited from BaseShellHelper

__construct() public ¶

__construct( ConsoleOutput $consoleOutput , array $config = array() )

Constructor.

Parameters
ConsoleOutput $consoleOutput
The ConsoleOutput instance to use.
array $config optional array()
The settings for this helper.

config() public ¶

config( null $config = null )

Initialize config & store config values

Parameters
null $config optional null
Config values to set
Returns
array|

Properties detail

$_progress ¶

protected integer

The current progress.

$_total ¶

protected integer

The total number of 'items' to progress through.

$_width ¶

protected integer

The width of the bar.

OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs