Skip to content

Instantly share code, notes, and snippets.

@TumTum
Created September 3, 2021 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TumTum/3cc3ef5b79bbe2baca2ad4532beea592 to your computer and use it in GitHub Desktop.
Save TumTum/3cc3ef5b79bbe2baca2ad4532beea592 to your computer and use it in GitHub Desktop.
Example Command for oxrun
<?php
/**
* Created by PhpStorm.
* User: tobi
* Date: 2018-11-27
* Time: 19:36
*/
namespace OxidEsales\DemoComponent\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Class HelloWorldCommand
*
* @package OxidEsales\DemoComponent\Command\HelloWorldCommand
*/
class HelloWorldCommand extends Command
{
protected function configure()
{
$this
->setName('demo-component:say-hello')
->setDescription('Hello World Command');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('Hello World');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment