1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
bitrix.php
См. документацию.
1
<?php
8
16
17
// include bitrix
18
require_once
'bootstrap.php'
;
19
20
// initialize symfony
21
use Symfony\Component\Console\Application;
22
23
$application
=
new
Application();
24
25
// register commands
26
$modules
=
\Bitrix\Main\ModuleManager::getInstalledModules
();
27
foreach
(
$modules
as
$moduleId
=> $_)
28
{
29
$config
=
\Bitrix\Main\Config\Configuration::getInstance
(
$moduleId
)->get(
'console'
);
30
if
(isset(
$config
[
'commands'
]) && is_array(
$config
[
'commands'
]))
31
{
32
if
(\
Bitrix
\Main\Loader::includeModule(
$moduleId
))
33
{
34
foreach
(
$config
[
'commands'
] as $commandClass)
35
{
36
if
(is_a($commandClass, \Symfony\Component\Console\Command\Command::class,
true
))
37
{
38
$application
->add(
new
$commandClass());
39
}
40
}
41
}
42
}
43
}
44
45
// run console
46
$application
->run();
Bitrix\Main\Config\Configuration\getInstance
static getInstance($moduleId=null)
Определения
configuration.php:45
Bitrix\Main\ModuleManager\getInstalledModules
static getInstalledModules()
Определения
modulemanager.php:9
$moduleId
$moduleId
Определения
group_bizproc_workflow_delete.php:16
$modules
$modules
Определения
bitrix.php:26
$application
$application
Определения
bitrix.php:23
Bitrix
$config
$config
Определения
quickway.php:69
bitrix
modules
main
cli
bitrix.php
Создано системой
1.14.0