Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 59 lines (44 sloc) 2.11 KB
#!/usr/bin/env php
<?php
use Symfony\Component\Validator\Mapping\ClassMetadataFactory;
use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\CachedReader;
use Doctrine\Common\Cache\ApcCache;
require 'vendor/autoload.php';
$app = new \Cilex\Application('Pazure');
$app->command(new \Pazure\Command\CompileCommand());
$app->command(new \Pazure\Command\SelfUpdateCommand());
$app->command(new \Pazure\Command\Certificates\ListCommand());
$app->command(new \Pazure\Command\Certificates\GetCommand());
$app->command(new \Pazure\Command\Certificates\DeleteCommand());
$app->command(new \Pazure\Command\Locations\ListCommand());
$app->command(new \Pazure\Command\Operations\GetCommand());
$app->command(new \Pazure\Command\Services\Storage\ListCommand());
$app->command(new \Pazure\Command\Services\Storage\CreateCommand());
$app->command(new \Pazure\Command\Services\Storage\DeleteCommand());
$app->command(new \Pazure\Command\Services\Storage\KeysCommand());
$app->command(new \Pazure\Command\Services\Storage\RegenerateKeyCommand());
$app->command(new \Pazure\Command\Services\Hosted\ListCommand());
$app->command(new \Pazure\Command\Services\Hosted\DeleteCommand());
#$path = $input->getArgument('path');
#$filesystem = new Filesystem();
#if (!$filesystem->isAbsolutePath($path)) {
# $path = getcwd().DIRECTORY_SEPARATOR.$path;
#}
$path = getcwd().DIRECTORY_SEPARATOR.'services.json';
$app->register(new \Cilex\Provider\GuzzleServiceProvider(), array('guzzle.configs' => $path));
$app->register(new \Cilex\Provider\ValidatorServiceProvider());
$app['validator.mapping.class_metadata_factory'] = $app->share(function () use ($app)
{
AnnotationRegistry::registerAutoloadNamespace("Symfony\Component\Validator\Constraint", __DIR__."/vendor/symfony/validator");
$reader = new CachedReader(
new AnnotationReader(),
new ApcCache(),
$debug = true
);
#$reader new AnnotationReader();
return new ClassMetadataFactory(new AnnotationLoader($reader));
});
$app->run();