* initial commit
This commit is contained in:
95
src/App/ConfigProvider.php
Normal file
95
src/App/ConfigProvider.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Monolog\Logger;
|
||||
|
||||
/**
|
||||
* The configuration provider for the App module
|
||||
*
|
||||
* @see https://docs.zendframework.com/zend-component-installer/
|
||||
*/
|
||||
class ConfigProvider
|
||||
{
|
||||
/**
|
||||
* Returns the configuration array
|
||||
*
|
||||
* To add a bit of a structure, each section is defined in a separate
|
||||
* method which returns an array with its configuration.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function __invoke()
|
||||
{
|
||||
return [
|
||||
'dependencies' => $this->getDependencies(),
|
||||
'templates' => $this->getTemplates(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the container dependencies
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDependencies()
|
||||
{
|
||||
return [
|
||||
'invokables' => [
|
||||
Action\PingAction::class => Action\PingAction::class,
|
||||
|
||||
],
|
||||
'factories' => [
|
||||
Action\MaintenanceAction::class => Action\MaintenanceFactory::class,
|
||||
Action\MaintenanceUpcomingAction::class => Action\MaintenanceUpcomingFactory::class,
|
||||
|
||||
Action\Auth\AuthAction::class => Action\Auth\AuthFactory::class,
|
||||
Action\User\UserAction::class => Action\User\UserFactory::class,
|
||||
Action\User\PasswordAction::class => Action\User\PasswordFactory::class,
|
||||
Action\Fault\FaultAction::class => Action\Fault\FaultFactory::class,
|
||||
Action\Fault\FaultAttachmentAction::class => Action\Fault\FaultAttachmentFactory::class,
|
||||
Action\Fault\FaultCommentAction::class => Action\Fault\FaultCommentFactory::class,
|
||||
Action\Fault\FaultRejectAction::class => Action\Fault\FaultRejectFactory::class,
|
||||
Action\ErrorOriginAction::class => Action\ErrorOriginFactory::class,
|
||||
Action\ErrorCategoryAction::class => Action\ErrorCategoryFactory::class,
|
||||
Action\FacilityLocationAction::class => Action\FacilityLocationFactory::class,
|
||||
Action\SolutionTimeIntervalAction::class => Action\SolutionTimeIntervalFactory::class,
|
||||
Action\Pdf\GenerateWorksheetAction::class => Action\Pdf\GenerateWorksheetFactory::class,
|
||||
Action\Pdf\GenerateMaintenanceSheetAction::class => Action\Pdf\GenerateMaintenanceSheetFactory::class,
|
||||
|
||||
Service\AuthService::class => Service\AuthServiceFactory::class,
|
||||
Service\UserService::class => Service\UserServiceFactory::class,
|
||||
Service\FaultManagerService::class => Service\FaultManagerServiceFactory::class,
|
||||
Service\FaultAttachmentService::class => Service\FaultAttachmentServiceFactory::class,
|
||||
Service\FixtureLoaderService::class => Service\FixtureLoaderServiceFactory::class,
|
||||
Service\ErrorCategoryService::class => Service\ErrorCategoryServiceFactory::class,
|
||||
Service\ErrorOriginService::class => Service\ErrorOriginServiceFactory::class,
|
||||
Service\FacilityLocationService::class => Service\FacilityLocationServiceFactory::class,
|
||||
Service\SolutionTimeIntervalService::class => Service\SolutionTimeIntervalServiceFactory::class,
|
||||
Service\PdfService::class => Service\PdfServiceFactory::class,
|
||||
Service\MailerService::class => Service\MailerServiceFactory::class,
|
||||
Service\MaintenanceManagerService::class => Service\MaintenanceManagerServiceFactory::class,
|
||||
Service\XlsxParserService::class => Service\XlsxParserServiceFactory::class,
|
||||
|
||||
'service.acl' => Service\RbaclFactory::class,
|
||||
Logger::class => Service\LoggerFactory::class,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the templates configuration
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTemplates()
|
||||
{
|
||||
return [
|
||||
'paths' => [
|
||||
'app' => ['templates/app'],
|
||||
'error' => ['templates/error'],
|
||||
'layout' => ['templates/layout'],
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user