PHP code example of yngc0der / bitrix-cli
1. Go to this page and download the library: Download yngc0der/bitrix-cli library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
yngc0der / bitrix-cli example snippets
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
'yngc0der.cli',
'OnCommandsLoad',
function (\Bitrix\Main\Event $event) {
$result = new \Bitrix\Main\EventResult(
\Bitrix\Main\EventResult::SUCCESS,
[
new \Bitrix\Main\Cli\OrmAnnotateCommand(), // instance of Symfony\Component\Console\Command\Command
]
);
return $result;
}
);