1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-17 14:45:06 -05:00

Add console script / component

This commit is contained in:
Vincent Jousse 2013-11-21 14:26:17 +01:00
parent b8f7398632
commit ff58233f85
4 changed files with 21 additions and 4 deletions

View File

@ -3,7 +3,8 @@
"silex/silex": "~1.1",
"atoum/atoum" : "dev-master",
"twig/twig": ">=1.8,<2.0-dev",
"symfony/twig-bridge": "~2.3"
"symfony/twig-bridge": "~2.3",
"knplabs/console-service-provider": "dev-master"
},
"autoload": {
"psr-0": { "Poche": "src/" }

10
console Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env php
<?php
set_time_limit(0);
require_once __DIR__.'/vendor/autoload.php';
require_once __DIR__.'/src/app.php';
$console = $app['console'];
echo "Hi there";

View File

@ -1,5 +1,14 @@
<?php
use Knp\Provider\ConsoleServiceProvider;
$app = new Silex\Application();
$app->register(new Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__.'/views',
));
$app->register(new ConsoleServiceProvider(), [
'console.name' => '%normalized_name%',
'console.version' => '0',
'console.project_directory' => __DIR__.'/..',
]);

View File

@ -6,9 +6,6 @@ if (php_sapi_name() === 'cli-server' && is_file($filename)) {
}
require_once __DIR__.'/../vendor/autoload.php';
$app = new Silex\Application();
require_once __DIR__.'/../src/app.php';
require_once __DIR__.'/../src/controllers.php';