* initial commit
This commit is contained in:
2
config/autoload/.gitignore
vendored
Normal file
2
config/autoload/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
local.php
|
||||
*.local.php
|
||||
42
config/autoload/dependencies.global.php
Normal file
42
config/autoload/dependencies.global.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Zend\Expressive\Application;
|
||||
use Zend\Expressive\Container;
|
||||
use Zend\Expressive\Delegate;
|
||||
use Zend\Expressive\Helper;
|
||||
use Zend\Expressive\Middleware;
|
||||
|
||||
return [
|
||||
// Provides application-wide services.
|
||||
// We recommend using fully-qualified class names whenever possible as
|
||||
// service names.
|
||||
'dependencies' => [
|
||||
// Use 'aliases' to alias a service name to another service. The
|
||||
// key is the alias name, the value is the service to which it points.
|
||||
'aliases' => [
|
||||
'Zend\Expressive\Delegate\DefaultDelegate' => Delegate\NotFoundDelegate::class,
|
||||
],
|
||||
// Use 'invokables' for constructor-less services, or services that do
|
||||
// not require arguments to the constructor. Map a service name to the
|
||||
// class name.
|
||||
'invokables' => [
|
||||
// Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class,
|
||||
Helper\ServerUrlHelper::class => Helper\ServerUrlHelper::class,
|
||||
],
|
||||
// Use 'factories' for services provided by callbacks/factory classes.
|
||||
'factories' => [
|
||||
Application::class => Container\ApplicationFactory::class,
|
||||
Delegate\NotFoundDelegate::class => Container\NotFoundDelegateFactory::class,
|
||||
Helper\ServerUrlMiddleware::class => Helper\ServerUrlMiddlewareFactory::class,
|
||||
Helper\UrlHelper::class => Helper\UrlHelperFactory::class,
|
||||
Helper\UrlHelperMiddleware::class => Helper\UrlHelperMiddlewareFactory::class,
|
||||
|
||||
Zend\Stratigility\Middleware\ErrorHandler::class => Container\ErrorHandlerFactory::class,
|
||||
Middleware\ErrorResponseGenerator::class => Container\ErrorResponseGeneratorFactory::class,
|
||||
Middleware\NotFoundHandler::class => Container\NotFoundHandlerFactory::class,
|
||||
|
||||
'doctrine.entity_manager.orm_default' => \ContainerInteropDoctrine\EntityManagerFactory::class,
|
||||
'doctrine.hydrator' => \App\Hydrator\DoctrineObjectFactory::class,
|
||||
],
|
||||
],
|
||||
];
|
||||
34
config/autoload/development.local.php.dist
Normal file
34
config/autoload/development.local.php.dist
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Development-only configuration.
|
||||
*
|
||||
* Put settings you want enabled when under development mode in this file, and
|
||||
* check it into your repository.
|
||||
*
|
||||
* Developers on your team will then automatically enable them by calling on
|
||||
* `composer development-enable`.
|
||||
*/
|
||||
|
||||
use Zend\Expressive\Container;
|
||||
use Zend\Expressive\Middleware\ErrorResponseGenerator;
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'invokables' => [
|
||||
],
|
||||
'factories' => [
|
||||
ErrorResponseGenerator::class => Container\WhoopsErrorResponseGeneratorFactory::class,
|
||||
'Zend\Expressive\Whoops' => Container\WhoopsFactory::class,
|
||||
'Zend\Expressive\WhoopsPageHandler' => Container\WhoopsPageHandlerFactory::class,
|
||||
],
|
||||
],
|
||||
|
||||
'whoops' => [
|
||||
'json_exceptions' => [
|
||||
'display' => true,
|
||||
'show_trace' => true,
|
||||
'ajax_only' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
68
config/autoload/doctrine.global.php
Normal file
68
config/autoload/doctrine.global.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'doctrine' => [
|
||||
'driver' => [
|
||||
'orm_default' => [
|
||||
'class' => \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class,
|
||||
'drivers' => [
|
||||
'App\Entity' => 'my_entity',
|
||||
],
|
||||
],
|
||||
'my_entity' => [
|
||||
'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class,
|
||||
'cache' => 'array',
|
||||
'paths' => __DIR__ . '/../../src/App/Entity',
|
||||
],
|
||||
],
|
||||
'configuration' => [
|
||||
'orm_default' => [
|
||||
// 'datetime_functions' => [
|
||||
// 'date' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'time' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'timestamp' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'convert_tz' => Oro\ORM\Query\AST\Functions\DateTime\ConvertTz::class,
|
||||
// ],
|
||||
'numeric_functions' => [
|
||||
// 'timestampdiff' => Oro\ORM\Query\AST\Functions\Numeric\TimestampDiff::class,
|
||||
// 'dayofyear' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'dayofmonth' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'dayofweek' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'week' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'day' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'hour' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'minute' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
'month' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'quarter' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'second' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
'year' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'sign' => Oro\ORM\Query\AST\Functions\Numeric\Sign::class,
|
||||
// 'pow' => Oro\ORM\Query\AST\Functions\Numeric\Pow::class,
|
||||
],
|
||||
// 'string_functions' => [
|
||||
// 'md5' => Oro\ORM\Query\AST\Functions\SimpleFunction::class,
|
||||
// 'group_concat' => Oro\ORM\Query\AST\Functions\String\GroupConcat::class,
|
||||
// 'cast' => Oro\ORM\Query\AST\Functions\Cast::class,
|
||||
// 'concat_ws' => Oro\ORM\Query\AST\Functions\String\ConcatWs::class
|
||||
// ]
|
||||
// 'filters' => [
|
||||
// 'soft-deleteable' => Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::class,
|
||||
// ],
|
||||
],
|
||||
],
|
||||
'event_manager' => [
|
||||
'orm_default' => [
|
||||
'subscribers' => [
|
||||
Gedmo\Timestampable\TimestampableListener::class,
|
||||
// 'Gedmo\Tree\TreeListener',
|
||||
// 'Gedmo\SoftDeleteable\SoftDeleteableListener',
|
||||
// 'Gedmo\Translatable\TranslatableListener',
|
||||
// 'Gedmo\Blameable\BlameableListener',
|
||||
// 'Gedmo\Loggable\LoggableListener',
|
||||
// 'Gedmo\Sortable\SortableListener',
|
||||
// 'Gedmo\Sluggable\SluggableListener',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
14
config/autoload/doctrine.local.dist.php
Normal file
14
config/autoload/doctrine.local.dist.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'doctrine' => [
|
||||
'connection' => [
|
||||
'orm_default' => [
|
||||
'params' => [
|
||||
'url' => 'mysqli://user:passwd@host/database',
|
||||
'charset' => 'UTF8',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
11
config/autoload/local.php.dist
Normal file
11
config/autoload/local.php.dist
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Local configuration.
|
||||
*
|
||||
* Copy this file to `local.php` and change its settings as required.
|
||||
* `local.php` is ignored by git and safe to use for local and sensitive data like usernames and passwords.
|
||||
*/
|
||||
|
||||
return [
|
||||
];
|
||||
12
config/autoload/router.global.php
Normal file
12
config/autoload/router.global.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Zend\Expressive\Router\FastRouteRouter;
|
||||
use Zend\Expressive\Router\RouterInterface;
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'invokables' => [
|
||||
RouterInterface::class => FastRouteRouter::class,
|
||||
],
|
||||
],
|
||||
];
|
||||
27
config/autoload/zend-expressive.global.php
Normal file
27
config/autoload/zend-expressive.global.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Zend\ConfigAggregator\ConfigAggregator;
|
||||
|
||||
return [
|
||||
// Toggle the configuration cache. Set this to boolean false, or remove the
|
||||
// directive, to disable configuration caching. Toggling development mode
|
||||
// will also disable it by default; clear the configuration cache using
|
||||
// `composer clear-config-cache`.
|
||||
ConfigAggregator::ENABLE_CACHE => true,
|
||||
|
||||
// Enable debugging; typically used to provide debugging information within templates.
|
||||
'debug' => false,
|
||||
|
||||
'zend-expressive' => [
|
||||
// Enable programmatic pipeline: Any `middleware_pipeline` or `routes`
|
||||
// configuration will be ignored when creating the `Application` instance.
|
||||
'programmatic_pipeline' => true,
|
||||
|
||||
// Provide templates for the error handling middleware to use when
|
||||
// generating responses.
|
||||
'error_handler' => [
|
||||
'template_404' => 'error::404',
|
||||
'template_error' => 'error::error',
|
||||
],
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user