Skip to content

Commit

Permalink
Update helpers.rst
Browse files Browse the repository at this point in the history
Made suggested amends to convert lowercase to CamelCase
  • Loading branch information
davidyell committed Feb 17, 2016
1 parent ef6ef3e commit 819fc68
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions en/console-and-shells/helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Shell Helpers let you package up complex output generation code. Shell
Helpers can be accessed and used from any shell or task::

// Output some data as a table.
$this->helper('table')->output($data);
$this->helper('Table')->output($data);

// Get a helper from a plugin.
$this->helper('Plugin.HelperName')->output($data);
Expand Down Expand Up @@ -46,10 +46,10 @@ the following in it::
We can then use this new helper in one of our shell commands by calling it::

// With ### on either side
$this->helper('heading')->output('It works!');
$this->helper('Heading')->output('It works!');

// With ~~~~ on either side
$this->helper('heading')->output('It works!', '~', 4);
$this->helper('Heading')->output('It works!', '~', 4);

Built-In Helpers
================
Expand All @@ -65,7 +65,7 @@ pretty simple::
['short', 'Longish thing', 'short'],
['Longer thing', 'short', 'Longest Value'],
];
$this->helper('table')->output($data);
$this->helper('Table')->output($data);

// Outputs
+--------------+---------------+---------------+
Expand All @@ -81,7 +81,7 @@ Progress Helper
The ProgressHelper can be used in two different ways. The simple mode lets you
provide a callback that is invoked until the progress is complete::

$this->helper('progress')->output(function ($progress) {
$this->helper('Progress')->output(function ($progress) {
// Do work here.
$progress->increment(20);
});
Expand All @@ -96,7 +96,7 @@ You can control the progress bar more by providing additional options:

An example of all the options in use would be::

$this->helper('progress')->output([
$this->helper('Progress')->output([
'total' => 10,
'width' => 20,
'callback' => function ($progress) {
Expand All @@ -107,11 +107,11 @@ An example of all the options in use would be::
The progress helper can also be used manually to increment and re-render the
progress bar as necessary::

$progress = $this->helper('progress');
$progress = $this->helper('Progress');
$progress->init([
'total' => 10,
'width' => 20,
]);

$this->helper->increment(4);
$this->helper->draw();
$progress->increment(4);
$progress->draw();

0 comments on commit 819fc68

Please sign in to comment.