#!/usr/bin/env php
<?php

/*
 * This file is part of gpupo/content-butler
 * Created by Gilmar Pupo <contact@gpupo.com>
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 * For more information, see <https://opensource.gpupo.com/>.
 */

namespace Gpupo\ContentButler\Console;

require getcwd() . DIRECTORY_SEPARATOR . 'bin/cli-config.php';

$cli = new \Symfony\Component\Console\Application("Content Butler", $server);
$cli->setCatchExceptions(true);
$cli->setHelperSet($helperSet);
$cli->addCommands(array(
    new \Gpupo\ContentButler\Command\Import\DirectoryCommand(),
    new \Gpupo\ContentButler\Command\Import\MillenialCommand(),
    new \PHPCR\Util\Console\Command\NodeDumpCommand(),
    new \PHPCR\Util\Console\Command\NodeMoveCommand(),
    new \PHPCR\Util\Console\Command\NodeRemoveCommand(),
    new \PHPCR\Util\Console\Command\NodesUpdateCommand(),
    new \PHPCR\Util\Console\Command\NodeTouchCommand(),
    new \PHPCR\Util\Console\Command\NodeTypeListCommand(),
    new \PHPCR\Util\Console\Command\NodeTypeRegisterCommand(),
    new \PHPCR\Util\Console\Command\WorkspaceCreateCommand(),
    new \PHPCR\Util\Console\Command\WorkspaceDeleteCommand(),
    new \PHPCR\Util\Console\Command\WorkspaceExportCommand(),
    new \PHPCR\Util\Console\Command\WorkspaceImportCommand(),
    new \PHPCR\Util\Console\Command\WorkspaceListCommand(),
    new \PHPCR\Util\Console\Command\WorkspacePurgeCommand(),
    new \PHPCR\Util\Console\Command\WorkspaceQueryCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\DocumentMigrateClassCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\DocumentConvertTranslationCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\GenerateProxiesCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\DumpQueryBuilderReferenceCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\InfoDoctrineCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\VerifyUniqueNodeTypesMappingCommand(),
    new \Doctrine\ODM\PHPCR\Tools\Console\Command\RegisterSystemNodeTypesCommand(),
));
if (isset($extraCommands) && ! empty($extraCommands)) {
    $cli->addCommands($extraCommands);
}
$cli->run();
