diff --git a/en/console-commands/commands.rst b/en/console-commands/commands.rst index 9493a24b5c..a19ace8f23 100644 --- a/en/console-commands/commands.rst +++ b/en/console-commands/commands.rst @@ -139,9 +139,14 @@ Creating Output =============== Commands are provided a ``ConsoleIo`` instance when executed. This object allows -you to interact with ``stdout``, ``stderr`` and create files. See the +you to interact with :php:meth:`~Cake\\Console\\ConsoleIo::out()` and +:php:meth:`~Cake\\Console\\ConsoleIo::err()` to emit on ``stdout``, and +``stderr``. Files can be created with overwrite confirmation with +:php:meth:`~Cake\\Console\\ConsoleIo::createFile()``. :ref:`command-helpers` +provide 'macros' for output generation. See the :doc:`/console-commands/input-output` section for more information. + Using Models in Commands ======================== diff --git a/en/console-commands/input-output.rst b/en/console-commands/input-output.rst index 3d03c3cd03..72a6b1d544 100644 --- a/en/console-commands/input-output.rst +++ b/en/console-commands/input-output.rst @@ -12,7 +12,10 @@ interactively read user input and output information to the user. Command Helpers =============== -Command Helpers can be accessed and used from any command:: +Formatting console output can be tedious and lead to maintenance issues. To +enable better re-use and testability of console formatting code, CakePHP command +helpers provide 'macros' for console formatting logic. Command Helpers can be +accessed and used from any command:: // Output some data as a table. $io->helper('Table')->output($data); @@ -20,7 +23,8 @@ Command Helpers can be accessed and used from any command:: // Get a helper from a plugin. $io->helper('Plugin.HelperName')->output($data); -You can also get instances of helpers and call any public methods on them:: +You can also get instances of helpers and call any public methods, to manipulate +state and generate updated output:: // Get and use the Progress Helper. $progress = $io->helper('Progress');