Initial commit
This commit is contained in:
14
src/Application.php
Normal file
14
src/Application.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli;
|
||||
|
||||
class Application extends \Symfony\Component\Console\Application
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct("slotcli", "0.0.0");
|
||||
|
||||
$this->add(new Command\ImportCommand());
|
||||
$this->add(new Command\ExportCommand());
|
||||
}
|
||||
}
|
10
src/Command/BaseCommand.php
Normal file
10
src/Command/BaseCommand.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
||||
abstract class BaseCommand extends Command
|
||||
{
|
||||
|
||||
}
|
11
src/Command/ExportCommand.php
Normal file
11
src/Command/ExportCommand.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name:"export", description:"Export the database to a file")]
|
||||
class ExportCommand extends BaseCommand
|
||||
{
|
||||
|
||||
}
|
11
src/Command/ImportCommand.php
Normal file
11
src/Command/ImportCommand.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace SlotDb\Cli\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
|
||||
#[AsCommand(name:"import", description:"Import database from file")]
|
||||
class ImportCommand extends BaseCommand
|
||||
{
|
||||
|
||||
}
|
7
src/bootstrap.php
Normal file
7
src/bootstrap.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
$app = new SlotDb\Cli\Application();
|
||||
|
||||
$app->run();
|
Reference in New Issue
Block a user