/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Console/CommandList.php
46 строк
1 KB
engcom-Dash
Fixed Static Failure & review comments
06 май 2025, 10:52
06 май 2025, 10:52
ac753ca
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ namespace Magento\Framework\Console; /** * Class CommandList has a list of commands, which can be extended via DI configuration. * @api */ class CommandList implements CommandListInterface { /** * @var string[] */ protected $commands; /** * CommandList constructor is being used for injecting new Commands * * Registration of new Commands can be done using `di.xml`: * <type name="Magento\Framework\Console\CommandList"> * <arguments> * <argument name="commands" xsi:type="array"> * <item name="your-command-name" xsi:type="object">Vendor\Module\Console\Command\YourCommand</item> * </argument> * </arguments> * </type> * * @param array $commands */ public function __construct(array $commands = []) { $this->commands = $commands; } /** * @inheritdoc */ public function getCommands() { return $this->commands; } }