Separation of concerns
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user