Skip to content

Instantly share code, notes, and snippets.

@jadwigo
Last active August 29, 2015 14:25
Show Gist options
  • Save jadwigo/63318525bb5fe53a958f to your computer and use it in GitHub Desktop.
Save jadwigo/63318525bb5fe53a958f to your computer and use it in GitHub Desktop.
extension with nut command
<?php
namespace Bolt\Extension\Europeana\ZohoImport;
use Bolt\Nut\BaseCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class Console extends BaseCommand
{
protected function configure()
{
$this
->setName('zoho:import')
->setDescription('Import ZOHO Contacts');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$text = $this->app['extensions.ZohoImport']->testPage();
$output->writeln($text);
}
}
lodewijk@jannie:html$ php app/nut zoho:import
<p>Redirecting to <a href='/bolt'>/bolt</a>.</p><script>window.setTimeout(function () { window.location='/bolt'; }, 500);</script>test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment