File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
lib/internal/Magento/Framework/Console Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2015 Adobe
4+ * All Rights Reserved .
55 */
66
77namespace Magento \Framework \Console ;
88
99/**
1010 * Class CommandList has a list of commands, which can be extended via DI configuration.
11+ * @api
1112 */
1213class CommandList implements CommandListInterface
1314{
@@ -17,7 +18,16 @@ class CommandList implements CommandListInterface
1718 protected $ commands ;
1819
1920 /**
20- * Constructor
21+ * CommandList constructor is being used for injecting new Commands
22+ *
23+ * Registration of new Commands can be done using `di.xml`:
24+ * <type name="Magento\Framework\Console\CommandList">
25+ * <arguments>
26+ * <argument name="commands" xsi:type="array">
27+ * <item name="your-command-name" xsi:type="object">Vendor\Module\Console\Command\YourCommand</item>
28+ * </argument>
29+ * </arguments>
30+ * </type>
2131 *
2232 * @param array $commands
2333 */
@@ -27,7 +37,7 @@ public function __construct(array $commands = [])
2737 }
2838
2939 /**
30- * { @inheritdoc}
40+ * @inheritdoc
3141 */
3242 public function getCommands ()
3343 {
You can’t perform that action at this time.
0 commit comments