44 lines
899 B
PHP
44 lines
899 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace ApiLibs;
|
|
|
|
/**
|
|
* 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(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Returns the container dependencies
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getDependencies()
|
|
{
|
|
return [
|
|
'invokables' => [],
|
|
'factories' => [
|
|
\Tuupola\Middleware\CorsMiddleware::class => Middleware\CorsMiddlewareFactory::class,
|
|
],
|
|
];
|
|
}
|
|
}
|