Initial commit

This commit is contained in:
2025-03-12 16:15:15 +01:00
commit c4877471f8
10 changed files with 1388 additions and 0 deletions

14
src/Application.php Normal file
View 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());
}
}

View File

@ -0,0 +1,10 @@
<?php
namespace SlotDb\Cli\Command;
use Symfony\Component\Console\Command\Command;
abstract class BaseCommand extends Command
{
}

View 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
{
}

View 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
View File

@ -0,0 +1,7 @@
<?php
require_once __DIR__."/../vendor/autoload.php";
$app = new SlotDb\Cli\Application();
$app->run();