@@ -33,8 +33,8 @@ The following properties should be used in order to get listed in CLI commands a
3333File Location
3434=============
3535
36- Commands must be stored within a directory named **Commands **. However, that directory can be located anywhere
37- that the :doc: `Autoloader </concepts/autoloader >` can locate it. This could be in **app/Commands **, or
36+ Commands must be stored within a directory named **Commands **. However, that directory has to be located in the PSR-4 namespaces
37+ so that the :doc: `Autoloader </concepts/autoloader >` can locate it. This could be in **app/Commands **, or
3838a directory that you keep commands in to use in all of your project development, like **Acme/Commands **.
3939
4040.. note :: When the commands are executed, the full CodeIgniter CLI environment has been loaded, making it
@@ -49,7 +49,7 @@ should contain the following code:
4949
5050.. literalinclude :: cli_commands/002.php
5151
52- If you run the **list ** command, you will see the new command listed under its own ``demo `` group. If you take
52+ If you run the **list ** command, you will see the new command listed under its own ``Demo `` group. If you take
5353a close look, you should see how this works fairly easily. The ``$group `` property simply tells it how to organize
5454this command with all of the other commands that exist, telling it what heading to list it under.
5555
@@ -92,7 +92,7 @@ For example, ``return EXIT_ERROR;``
9292
9393This approach can help with debugging at the system level, if the command, for example, is run via crontab.
9494
95- You can use the ``EXIT_* `` exit code constants defined in the `` app/Config/Constants.php `` file.
95+ You can use the ``EXIT_* `` exit code constants defined in the ** app/Config/Constants.php ** file.
9696
9797***********
9898BaseCommand
@@ -127,11 +127,25 @@ be familiar with when creating your own commands. It also has a :doc:`Logger </g
127127
128128 A method to show command help: (usage,arguments,description,options)
129129
130+ .. php :method :: setPad(string $item, int $max, int $extra = 2, int $indent = 0): string
131+
132+ :param string $item: The string item.
133+ :param integer $max: The max size.
134+ :param integer $extra: How many extra spaces to add at the end.
135+ :param integer $indent: The indent spaces.
136+
137+ Pads our string out so that all titles are the same length to nicely line
138+ up descriptions:
139+
140+ .. literalinclude :: cli_commands/007.php
141+ :lines: 2-
142+
130143 .. php :method :: getPad($array, $pad)
131144
145+ .. deprecated :: 4.0.5
146+ Use :php:meth: `CodeIgniter\\ CLI\\ BaseCommand::setPad() ` instead.
147+
132148 :param array $array: The $key => $value array.
133149 :param integer $pad: The pad spaces.
134150
135- A method to calculate padding for ``$key => $value `` array output. The padding can be used to output a will formatted table in CLI:
136-
137- .. literalinclude :: cli_commands/007.php
151+ A method to calculate padding for ``$key => $value `` array output. The padding can be used to output a will formatted table in CLI.
0 commit comments