PHP code example of biblibre / omeka-cli

1. Go to this page and download the library: Download biblibre/omeka-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/ */

    

biblibre / omeka-cli example snippets


$events = Zend_EventManager_StaticEventManager::getInstance();
$events->attach('OmekaCli', 'commands', function() {
    return array(
        'Foo_Bar',
    );
});

use OmekaCli\Command\AbstractCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class Foo_Bar extends AbstractCommand
{
    protected function configure()
    {
        $this->setName('foo:bar');
        $this->setDescription('print something to stdout');
        $this->setAliases(array('bar'));
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Hello, omeka-cli!');

        return 0;
    }
}