Separation of concerns

This commit is contained in:
2021-04-08 15:36:57 +02:00
parent cc2696668c
commit afff03166e
15 changed files with 155 additions and 96 deletions

View File

@@ -3,17 +3,12 @@
use IO\ExceptionHandler;
use IO\Input\ShowInfoArguments;
use IO\Output\DocumentOutput;
use IO\Output\DocumentDetails;
require_once __DIR__ . '/../vendor/autoload.php';
ExceptionHandler::registerCallback();
$arguments = ShowInfoArguments::createFromGlobals();
$file = $arguments->getFile();
$documentFactory = DocumentFactory::create();
$document = $documentFactory->createDocument($file);
$output = DocumentOutput::forDocument($document);
$output->render();
$file = ShowInfoArguments::createFromGlobals()->getFile();
$document = DocumentFactory::create()->fromFile($file);
DocumentDetails::of($document)->render();