PHP code example of aeyoll / fop_console
1. Go to this page and download the library: Download aeyoll/fop_console 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/ */
aeyoll / fop_console example snippets
// psr-4 autoloader
namespace FOP\Console\Commands\Domain; // e.g. namespace FOP\Console\Commands\Configuration
use FOP\Console\Command;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
final class DomainAction extends Command
{
/**
* {@inheritdoc}
*/
protected function configure()
{
$this
->setName('fop:domain') // e.g 'fop:export'
// or
->setName('fop:domain:action') // e.g 'fop:configuration:export'
->setDescription('Describe the command on a user perspective.');
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->io->text('Hello friends of PrestaShop!');
return 0; // return 0 on success or 1 on failure.
}
}