mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-09-04 04:35:33 +01:00
Start using Symfony Components
This commit is contained in:
parent
b61178b9b0
commit
bc3dae9c48
9 changed files with 131 additions and 13 deletions
|
@ -1,14 +1,4 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Builder;
|
||||
|
||||
if (file_exists(__DIR__.'/../../../../filters.php')) {
|
||||
$filters = require(__DIR__.'/../../../../filters.php');
|
||||
} elseif (file_exists(__DIR__.'/../filters.php')) {
|
||||
$filters = require(__DIR__.'/../filters.php');
|
||||
} else {
|
||||
throw new \Exception('No filters.php file found.');
|
||||
}
|
||||
|
||||
echo new Builder($filters);
|
||||
require_once __DIR__.'/generate-filters.php';
|
||||
|
|
12
bin/generate-filters.php
Normal file
12
bin/generate-filters.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Container\Container;
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
$container = new Container();
|
||||
|
||||
/** @var Application $application */
|
||||
$application = $container->get('app.cli');
|
||||
$application->run();
|
Loading…
Add table
Add a link
Reference in a new issue