Last active
December 26, 2015 19:59
-
-
Save stefanotorresi/7205673 to your computer and use it in GitHub Desktop.
Zend\Stdlib\ArrayUtils::merge() benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include '../zf2/vendor/autoload.php'; | |
$array = include 'config.php'; // ZendSkeletonApp merged configuration | |
$array2 = include 'config2.php'; // zf-apigility-skeleton merged configuration | |
$array3 = include 'config3.php'; // zf-apigility-skeleton merged configuration with a traversable | |
$cycle = isset($argv[1]) ? $argv[1] : 1000; | |
echo 'cycling '.$cycle.' times' . PHP_EOL; | |
$totalTime = 0; | |
$totalTimeWithTraversable = 0; | |
for ($i = 0; $i < $cycle; $i++) { | |
$startTime = microtime(true); | |
Zend\Stdlib\ArrayUtils::merge($array, $array2); | |
$elapsedTime = microtime(true) - $startTime; | |
$totalTime += $elapsedTime; | |
$startTime = microtime(true); | |
Zend\Stdlib\ArrayUtils::merge($array, $array3); | |
$elapsedTime = microtime(true) - $startTime; | |
$totalTimeWithTraversable += $elapsedTime; | |
} | |
echo 'merge arrays' . PHP_EOL; | |
echo 'total time: ' . $totalTime . PHP_EOL; | |
echo 'mean time: ' . $totalTime / $cycle . PHP_EOL.PHP_EOL; | |
echo 'merge with a traversable' . PHP_EOL; | |
echo 'total time: ' . $totalTimeWithTraversable . PHP_EOL; | |
echo 'mean time: ' . $totalTimeWithTraversable / $cycle . PHP_EOL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array ( | |
'router' => | |
array ( | |
'routes' => | |
array ( | |
'home' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\Index', | |
'action' => 'index', | |
), | |
), | |
), | |
'application' => | |
array ( | |
'type' => 'Literal', | |
'options' => | |
array ( | |
'route' => '/application', | |
'defaults' => | |
array ( | |
'__NAMESPACE__' => 'Application\\Controller', | |
'controller' => 'Index', | |
'action' => 'index', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'default' => | |
array ( | |
'type' => 'Segment', | |
'options' => | |
array ( | |
'route' => '/[:controller[/:action]]', | |
'constraints' => | |
array ( | |
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
), | |
'defaults' => | |
array ( | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
'service_manager' => | |
array ( | |
'abstract_factories' => | |
array ( | |
0 => 'Zend\\Cache\\Service\\StorageCacheAbstractServiceFactory', | |
1 => 'Zend\\Log\\LoggerAbstractServiceFactory', | |
), | |
'aliases' => | |
array ( | |
'translator' => 'MvcTranslator', | |
), | |
), | |
'translator' => | |
array ( | |
'locale' => 'en_US', | |
'translation_file_patterns' => | |
array ( | |
0 => | |
array ( | |
'type' => 'gettext', | |
'base_dir' => '/var/www/miei/zend/ZendSkeletonApplication/module/Application/config/../language', | |
'pattern' => '%s.mo', | |
), | |
), | |
), | |
'controllers' => | |
array ( | |
'invokables' => | |
array ( | |
'Application\\Controller\\Index' => 'Application\\Controller\\IndexController', | |
), | |
), | |
'view_manager' => | |
array ( | |
'display_not_found_reason' => true, | |
'display_exceptions' => true, | |
'doctype' => 'HTML5', | |
'not_found_template' => 'error/404', | |
'exception_template' => 'error/index', | |
'template_map' => | |
array ( | |
'layout/layout' => '/var/www/miei/zend/ZendSkeletonApplication/module/Application/config/../view/layout/layout.phtml', | |
'application/index/index' => '/var/www/miei/zend/ZendSkeletonApplication/module/Application/config/../view/application/index/index.phtml', | |
'error/404' => '/var/www/miei/zend/ZendSkeletonApplication/module/Application/config/../view/error/404.phtml', | |
'error/index' => '/var/www/miei/zend/ZendSkeletonApplication/module/Application/config/../view/error/index.phtml', | |
), | |
'template_path_stack' => | |
array ( | |
0 => '/var/www/miei/zend/ZendSkeletonApplication/module/Application/config/../view', | |
), | |
), | |
'console' => | |
array ( | |
'router' => | |
array ( | |
'routes' => | |
array ( | |
), | |
), | |
), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array ( | |
'router' => | |
array ( | |
'routes' => | |
array ( | |
'home' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\Index', | |
'action' => 'index', | |
), | |
), | |
), | |
'application' => | |
array ( | |
'type' => 'Literal', | |
'options' => | |
array ( | |
'route' => '/application', | |
'defaults' => | |
array ( | |
'__NAMESPACE__' => 'Application\\Controller', | |
'controller' => 'Index', | |
'action' => 'index', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'default' => | |
array ( | |
'type' => 'Segment', | |
'options' => | |
array ( | |
'route' => '/[:controller[/:action]]', | |
'constraints' => | |
array ( | |
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
), | |
'defaults' => | |
array ( | |
), | |
), | |
), | |
), | |
), | |
'zf-apigility-welcome' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/welcome', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Welcome\\Welcome', | |
'action' => 'welcome', | |
), | |
), | |
), | |
'zf-apigility-admin' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/admin', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\App', | |
'action' => 'app', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'api' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/api', | |
'defaults' => | |
array ( | |
'action' => false, | |
), | |
), | |
'may_terminate' => false, | |
'child_routes' => | |
array ( | |
'config' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/config', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Configuration\\ConfigController', | |
'action' => 'process', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'module' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/module', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Configuration\\ModuleConfigController', | |
), | |
), | |
), | |
), | |
), | |
'source' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/source', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\Source', | |
'action' => 'source', | |
), | |
), | |
), | |
'module-enable' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/module.enable', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\ModuleCreation', | |
'action' => 'apiEnable', | |
), | |
), | |
), | |
'versioning' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/versioning', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\Versioning', | |
'action' => 'versioning', | |
), | |
), | |
), | |
'module' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/module[/:name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\Module', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'rpc-service' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/rpc[/:controller_service_name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\RpcService', | |
), | |
), | |
), | |
'rest-service' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/rest[/:controller_service_name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\RestService', | |
), | |
), | |
), | |
), | |
), | |
'db-adapter' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/db-adapter[/:adapter_name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\DbAdapter', | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
'zf-apigility-example.rpc.hello-world' => | |
array ( | |
'type' => 'Literal', | |
'options' => | |
array ( | |
'route' => '/api/example/hello', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller', | |
), | |
), | |
), | |
'zf-apigility-example.rest.status' => | |
array ( | |
'type' => 'Segment', | |
'options' => | |
array ( | |
'route' => '/api/example/status[/:id]', | |
'constraints' => | |
array ( | |
'id' => '[a-f0-9]{32}', | |
), | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller', | |
), | |
), | |
), | |
), | |
), | |
'service_manager' => | |
array ( | |
'abstract_factories' => | |
array ( | |
0 => 'Zend\\Cache\\Service\\StorageCacheAbstractServiceFactory', | |
1 => 'Zend\\Log\\LoggerAbstractServiceFactory', | |
2 => 'ZF\\Apigility\\DbConnectedResourceAbstractFactory', | |
3 => 'ZF\\Apigility\\TableGatewayAbstractFactory', | |
4 => 'Zend\\Db\\Adapter\\AdapterAbstractServiceFactory', | |
5 => 'Zend\\Db\\Adapter\\AdapterAbstractServiceFactory', | |
), | |
'aliases' => | |
array ( | |
'translator' => 'MvcTranslator', | |
), | |
'factories' => | |
array ( | |
'AssetManager\\Service\\AssetManager' => 'AssetManager\\Service\\AssetManagerServiceFactory', | |
'AssetManager\\Service\\AssetFilterManager' => 'AssetManager\\Service\\AssetFilterManagerServiceFactory', | |
'AssetManager\\Service\\AssetCacheManager' => 'AssetManager\\Service\\AssetCacheManagerServiceFactory', | |
'AssetManager\\Service\\AggregateResolver' => 'AssetManager\\Service\\AggregateResolverServiceFactory', | |
'AssetManager\\Resolver\\MapResolver' => 'AssetManager\\Service\\MapResolverServiceFactory', | |
'AssetManager\\Resolver\\PathStackResolver' => 'AssetManager\\Service\\PathStackResolverServiceFactory', | |
'AssetManager\\Resolver\\PrioritizedPathsResolver' => 'AssetManager\\Service\\PrioritizedPathsResolverServiceFactory', | |
'AssetManager\\Resolver\\CollectionResolver' => 'AssetManager\\Service\\CollectionResolverServiceFactory', | |
), | |
'invokables' => | |
array ( | |
'mime_resolver' => 'AssetManager\\Service\\MimeResolver', | |
'ZF\\Rest\\RestParametersListener' => 'ZF\\Rest\\Listener\\RestParametersListener', | |
'ZF\\Configuration\\ConfigWriter' => 'Zend\\Config\\Writer\\PhpArray', | |
'ZF\\Versioning\\VersionListener' => 'ZF\\Versioning\\VersionListener', | |
), | |
), | |
'translator' => | |
array ( | |
'locale' => 'en_US', | |
'translation_file_patterns' => | |
array ( | |
0 => | |
array ( | |
'type' => 'gettext', | |
'base_dir' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../language', | |
'pattern' => '%s.mo', | |
), | |
), | |
), | |
'controllers' => | |
array ( | |
'invokables' => | |
array ( | |
'Application\\Controller\\Index' => 'Application\\Controller\\IndexController', | |
'Application\\Controller\\DevelopmentMode' => 'Application\\Controller\\DevelopmentModeController', | |
'ZF\\Apigility\\Welcome\\Welcome' => 'ZF\\Apigility\\Welcome\\WelcomeController', | |
'ZFTool\\Controller\\Info' => 'ZFTool\\Controller\\InfoController', | |
'ZFTool\\Controller\\Config' => 'ZFTool\\Controller\\ConfigController', | |
'ZFTool\\Controller\\Module' => 'ZFTool\\Controller\\ModuleController', | |
'ZFTool\\Controller\\Classmap' => 'ZFTool\\Controller\\ClassmapController', | |
'ZFTool\\Controller\\Create' => 'ZFTool\\Controller\\CreateController', | |
'ZFTool\\Controller\\Install' => 'ZFTool\\Controller\\InstallController', | |
'ZFTool\\Controller\\Diagnostics' => 'ZFTool\\Controller\\DiagnosticsController', | |
'ZF\\Apigility\\Admin\\Controller\\App' => 'ZF\\Apigility\\Admin\\Controller\\AppController', | |
), | |
'abstract_factories' => | |
array ( | |
0 => 'ZF\\Rest\\Factory\\RestControllerFactory', | |
1 => 'ZF\\Rpc\\Factory\\RpcControllerFactory', | |
), | |
), | |
'view_manager' => | |
array ( | |
'display_not_found_reason' => true, | |
'display_exceptions' => false, | |
'doctype' => 'HTML5', | |
'not_found_template' => 'error/404', | |
'exception_template' => 'error/index', | |
'template_map' => | |
array ( | |
'layout/layout' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/layout/layout.phtml', | |
'application/index/index' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/application/index/index.phtml', | |
'error/404' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/error/404.phtml', | |
'error/index' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/error/index.phtml', | |
'zf-tool/diagnostics/run' => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zendframework/zftool/config/../view/diagnostics/run.phtml', | |
'zf/app/app' => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-admin/config/../view/app.phtml', | |
), | |
'template_path_stack' => | |
array ( | |
0 => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view', | |
'zf-apigility-welcome' => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-welcome/config/../view', | |
), | |
), | |
'console' => | |
array ( | |
'router' => | |
array ( | |
'routes' => | |
array ( | |
'development-disable' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'development disable', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\DevelopmentMode', | |
'action' => 'disable', | |
), | |
), | |
), | |
'development-enable' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'development enable', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\DevelopmentMode', | |
'action' => 'enable', | |
), | |
), | |
), | |
'zftool-version' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'version', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Info', | |
'action' => 'version', | |
), | |
), | |
), | |
'zftool-version2' => | |
array ( | |
'options' => | |
array ( | |
'route' => '--version', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Info', | |
'action' => 'version', | |
), | |
), | |
), | |
'zftool-config-list' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'config list [--local|-l]:local', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Config', | |
'action' => 'list', | |
), | |
), | |
), | |
'zftool-config' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'config <action> [<arg1>] [<arg2>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Config', | |
'action' => 'get', | |
), | |
), | |
), | |
'zftool-classmap-generate' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'classmap generate <directory> [<destination>] [--append|-a] [--overwrite|-w]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Classmap', | |
'action' => 'generate', | |
), | |
), | |
), | |
'zftool-modules-list' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'modules [list]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Module', | |
'action' => 'list', | |
), | |
), | |
), | |
'zftool-create-project' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create project <path>', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'project', | |
), | |
), | |
), | |
'zftool-create-module' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create module <name> [<path>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'module', | |
), | |
), | |
), | |
'zftool-create-controller' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create controller <name> <module> [<path>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'controller', | |
), | |
), | |
), | |
'zftool-create-action' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create action <name> <controllerName> <module>', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'method', | |
), | |
), | |
), | |
'zftool-install-zf' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'install zf <path> [<version>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Install', | |
'action' => 'zf', | |
), | |
), | |
), | |
'zftool-diagnostics' => | |
array ( | |
'options' => | |
array ( | |
'route' => '(diagnostics|diag) [-v|--verbose]:verbose [--debug] [-q|--quiet]:quiet [-b|--break]:break [<testGroupName>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Diagnostics', | |
'action' => 'run', | |
), | |
), | |
), | |
), | |
), | |
), | |
'asset_manager' => | |
array ( | |
'resolver_configs' => | |
array ( | |
'paths' => | |
array ( | |
0 => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility/config/../asset', | |
1 => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-welcome/config/../asset', | |
2 => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-admin/config/../asset', | |
), | |
), | |
'resolvers' => | |
array ( | |
'AssetManager\\Resolver\\MapResolver' => 2000, | |
'AssetManager\\Resolver\\CollectionResolver' => 1500, | |
'AssetManager\\Resolver\\PrioritizedPathsResolver' => 1000, | |
'AssetManager\\Resolver\\PathStackResolver' => 500, | |
), | |
), | |
'zf-apigility' => | |
array ( | |
'db-connected' => | |
array ( | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusResource' => | |
array ( | |
'controller_service_name' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller', | |
'adapter_name' => 'Db\\Status', | |
'table_name' => 'status', | |
'identifier_name' => 'id', | |
'hydrator_name' => 'ClassMethods', | |
), | |
), | |
), | |
'zf-api-problem' => | |
array ( | |
'render_error_controllers' => | |
array ( | |
0 => 'ZF\\Configuration\\ConfigController', | |
), | |
), | |
'zf-hal' => | |
array ( | |
'renderer' => | |
array ( | |
), | |
'metadata_map' => | |
array ( | |
'ZF\\Apigility\\Admin\\Model\\DbConnectedRestServiceEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'controller_service_name', | |
'route_name' => 'zf-apigility-admin/api/module/rest-service', | |
), | |
'ZF\\Apigility\\Admin\\Model\\DbAdapterEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'adapter_name', | |
'route_name' => 'zf-apigility-admin/api/db-adapter', | |
), | |
'ZF\\Apigility\\Admin\\Model\\ModuleEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'name', | |
'route_name' => 'zf-apigility-admin/api/module', | |
), | |
'ZF\\Apigility\\Admin\\Model\\RestServiceEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'controller_service_name', | |
'route_name' => 'zf-apigility-admin/api/module/rest-service', | |
), | |
'ZF\\Apigility\\Admin\\Model\\RpcServiceEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'controller_service_name', | |
'route_name' => 'zf-apigility-admin/api/module/rpc-service', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusEntity' => | |
array ( | |
'hydrator' => 'ClassMethods', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusCollection' => | |
array ( | |
'is_collection' => '1', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
'ZF\\Apigility\\Example\\V2\\Rest\\Status\\StatusEntity' => | |
array ( | |
'hydrator' => 'ClassMethods', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
'ZF\\Apigility\\Example\\V2\\Rest\\Status\\StatusCollection' => | |
array ( | |
'is_collection' => '1', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
), | |
), | |
'zf-content-negotiation' => | |
array ( | |
'selectors' => | |
array ( | |
'HalJson' => | |
array ( | |
'ZF\\Hal\\View\\HalJsonModel' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
'Json' => | |
array ( | |
'ZF\\ContentNegotiation\\JsonModel' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
), | |
'controllers' => | |
array ( | |
'ZF\\Configuration\\ConfigController' => 'Json', | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\Module' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\Source' => 'Json', | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => 'Json', | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => 'Json', | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => 'HalJson', | |
), | |
'accept-whitelist' => | |
array ( | |
'ZF\\Configuration\\ConfigController' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/vnd.zfcampus.v1.config+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Module' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Source' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
'content-type-whitelist' => | |
array ( | |
'ZF\\Configuration\\ConfigController' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/vnd.zfcampus.v1.config+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Module' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Source' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
), | |
'controller_plugins' => | |
array ( | |
'invokables' => | |
array ( | |
'routeParam' => 'ZF\\ContentNegotiation\\ControllerPlugin\\RouteParam', | |
'queryParam' => 'ZF\\ContentNegotiation\\ControllerPlugin\\QueryParam', | |
'bodyParam' => 'ZF\\ContentNegotiation\\ControllerPlugin\\BodyParam', | |
'routeParams' => 'ZF\\ContentNegotiation\\ControllerPlugin\\RouteParams', | |
'queryParams' => 'ZF\\ContentNegotiation\\ControllerPlugin\\QueryParams', | |
'bodyParams' => 'ZF\\ContentNegotiation\\ControllerPlugin\\BodyParams', | |
), | |
), | |
'zf-rest' => | |
array ( | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\DbAdapterResource', | |
'route_name' => 'zf-apigility-admin/api/db-adapter', | |
'identifier_name' => 'adapter_name', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\DbAdapterEntity', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'DELETE', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'db_adapter', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Module' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\ModuleResource', | |
'route_name' => 'zf-apigility-admin/api/module', | |
'identifier_name' => 'name', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\ModuleEntity', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'module', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\RpcServiceResource', | |
'route_name' => 'zf-apigility-admin/api/module/rpc-service', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\RpcServiceEntity', | |
'identifier_name' => 'controller_service_name', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'DELETE', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'rpc', | |
'collection_query_whitelist' => | |
array ( | |
0 => 'version', | |
), | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\RestServiceResource', | |
'route_name' => 'zf-apigility-admin/api/module/rest-service', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\RestServiceEntity', | |
'identifier_name' => 'controller_service_name', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'DELETE', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'rest', | |
'collection_query_whitelist' => | |
array ( | |
0 => 'version', | |
), | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusResource', | |
'collection_name' => 'status', | |
'page_size' => '10', | |
'route_name' => 'zf-apigility-example.rest.status', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'PUT', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'entity_class' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusEntity', | |
'collection_class' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusCollection', | |
), | |
), | |
'zf-rpc' => | |
array ( | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'PUT', | |
), | |
'route_name' => 'zf-apigility-admin/api/module-enable', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Source' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'GET', | |
), | |
'route_name' => 'zf-apigility-admin/api/source', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'PATCH', | |
), | |
'route_name' => 'zf-apigility-admin/api/versioning', | |
), | |
'ZF\\Configuration\\ConfigController' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
), | |
'route_name' => 'zf-apigility-admin/api/config', | |
), | |
'ZF\\Configuration\\ModuleConfigController' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
), | |
'route_name' => 'zf-apigility-admin/api/config/module', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => | |
array ( | |
'http_methods' => | |
array ( | |
), | |
'route_name' => 'zf-apigility-example.rpc.hello-world', | |
'callable' => 'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\HelloWorldController::hello', | |
), | |
), | |
'zf-configuration' => | |
array ( | |
'config-file' => 'config/autoload/development.php', | |
), | |
'zf-versioning' => | |
array ( | |
'content-type' => | |
array ( | |
), | |
'uri' => | |
array ( | |
), | |
), | |
'ZFTool' => | |
array ( | |
'disable_usage' => false, | |
), | |
'diagnostics' => | |
array ( | |
'ZF' => | |
array ( | |
'PHP Version' => | |
array ( | |
0 => 'ZFTool\\Diagnostics\\Test\\PhpVersion', | |
1 => '5.3.3', | |
), | |
), | |
), | |
'db' => | |
array ( | |
'adapters' => | |
array ( | |
'Db\\Status' => | |
array ( | |
'driver' => 'Pdo_Sqlite', | |
'database' => '/var/www/miei/zend/zf-apigility-skeleton/data/db/status.db', | |
), | |
), | |
), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return array ( | |
'router' => | |
array ( | |
'routes' => new Zend\Config\Config( | |
array ( | |
'home' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\Index', | |
'action' => 'index', | |
), | |
), | |
), | |
'application' => | |
array ( | |
'type' => 'Literal', | |
'options' => | |
array ( | |
'route' => '/application', | |
'defaults' => | |
array ( | |
'__NAMESPACE__' => 'Application\\Controller', | |
'controller' => 'Index', | |
'action' => 'index', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'default' => | |
array ( | |
'type' => 'Segment', | |
'options' => | |
array ( | |
'route' => '/[:controller[/:action]]', | |
'constraints' => | |
array ( | |
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | |
), | |
'defaults' => | |
array ( | |
), | |
), | |
), | |
), | |
), | |
'zf-apigility-welcome' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/welcome', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Welcome\\Welcome', | |
'action' => 'welcome', | |
), | |
), | |
), | |
'zf-apigility-admin' => | |
array ( | |
'type' => 'Zend\\Mvc\\Router\\Http\\Literal', | |
'options' => | |
array ( | |
'route' => '/admin', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\App', | |
'action' => 'app', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'api' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/api', | |
'defaults' => | |
array ( | |
'action' => false, | |
), | |
), | |
'may_terminate' => false, | |
'child_routes' => | |
array ( | |
'config' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/config', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Configuration\\ConfigController', | |
'action' => 'process', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'module' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/module', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Configuration\\ModuleConfigController', | |
), | |
), | |
), | |
), | |
), | |
'source' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/source', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\Source', | |
'action' => 'source', | |
), | |
), | |
), | |
'module-enable' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/module.enable', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\ModuleCreation', | |
'action' => 'apiEnable', | |
), | |
), | |
), | |
'versioning' => | |
array ( | |
'type' => 'literal', | |
'options' => | |
array ( | |
'route' => '/versioning', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\Versioning', | |
'action' => 'versioning', | |
), | |
), | |
), | |
'module' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/module[/:name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\Module', | |
), | |
), | |
'may_terminate' => true, | |
'child_routes' => | |
array ( | |
'rpc-service' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/rpc[/:controller_service_name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\RpcService', | |
), | |
), | |
), | |
'rest-service' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/rest[/:controller_service_name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\RestService', | |
), | |
), | |
), | |
), | |
), | |
'db-adapter' => | |
array ( | |
'type' => 'segment', | |
'options' => | |
array ( | |
'route' => '/db-adapter[/:adapter_name]', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Admin\\Controller\\DbAdapter', | |
), | |
), | |
), | |
), | |
), | |
), | |
), | |
'zf-apigility-example.rpc.hello-world' => | |
array ( | |
'type' => 'Literal', | |
'options' => | |
array ( | |
'route' => '/api/example/hello', | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller', | |
), | |
), | |
), | |
'zf-apigility-example.rest.status' => | |
array ( | |
'type' => 'Segment', | |
'options' => | |
array ( | |
'route' => '/api/example/status[/:id]', | |
'constraints' => | |
array ( | |
'id' => '[a-f0-9]{32}', | |
), | |
'defaults' => | |
array ( | |
'controller' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller', | |
), | |
), | |
), | |
)), | |
), | |
'service_manager' => | |
array ( | |
'abstract_factories' => | |
array ( | |
0 => 'Zend\\Cache\\Service\\StorageCacheAbstractServiceFactory', | |
1 => 'Zend\\Log\\LoggerAbstractServiceFactory', | |
2 => 'ZF\\Apigility\\DbConnectedResourceAbstractFactory', | |
3 => 'ZF\\Apigility\\TableGatewayAbstractFactory', | |
4 => 'Zend\\Db\\Adapter\\AdapterAbstractServiceFactory', | |
5 => 'Zend\\Db\\Adapter\\AdapterAbstractServiceFactory', | |
), | |
'aliases' => | |
array ( | |
'translator' => 'MvcTranslator', | |
), | |
'factories' => | |
array ( | |
'AssetManager\\Service\\AssetManager' => 'AssetManager\\Service\\AssetManagerServiceFactory', | |
'AssetManager\\Service\\AssetFilterManager' => 'AssetManager\\Service\\AssetFilterManagerServiceFactory', | |
'AssetManager\\Service\\AssetCacheManager' => 'AssetManager\\Service\\AssetCacheManagerServiceFactory', | |
'AssetManager\\Service\\AggregateResolver' => 'AssetManager\\Service\\AggregateResolverServiceFactory', | |
'AssetManager\\Resolver\\MapResolver' => 'AssetManager\\Service\\MapResolverServiceFactory', | |
'AssetManager\\Resolver\\PathStackResolver' => 'AssetManager\\Service\\PathStackResolverServiceFactory', | |
'AssetManager\\Resolver\\PrioritizedPathsResolver' => 'AssetManager\\Service\\PrioritizedPathsResolverServiceFactory', | |
'AssetManager\\Resolver\\CollectionResolver' => 'AssetManager\\Service\\CollectionResolverServiceFactory', | |
), | |
'invokables' => | |
array ( | |
'mime_resolver' => 'AssetManager\\Service\\MimeResolver', | |
'ZF\\Rest\\RestParametersListener' => 'ZF\\Rest\\Listener\\RestParametersListener', | |
'ZF\\Configuration\\ConfigWriter' => 'Zend\\Config\\Writer\\PhpArray', | |
'ZF\\Versioning\\VersionListener' => 'ZF\\Versioning\\VersionListener', | |
), | |
), | |
'translator' => | |
array ( | |
'locale' => 'en_US', | |
'translation_file_patterns' => | |
array ( | |
0 => | |
array ( | |
'type' => 'gettext', | |
'base_dir' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../language', | |
'pattern' => '%s.mo', | |
), | |
), | |
), | |
'controllers' => | |
array ( | |
'invokables' => | |
array ( | |
'Application\\Controller\\Index' => 'Application\\Controller\\IndexController', | |
'Application\\Controller\\DevelopmentMode' => 'Application\\Controller\\DevelopmentModeController', | |
'ZF\\Apigility\\Welcome\\Welcome' => 'ZF\\Apigility\\Welcome\\WelcomeController', | |
'ZFTool\\Controller\\Info' => 'ZFTool\\Controller\\InfoController', | |
'ZFTool\\Controller\\Config' => 'ZFTool\\Controller\\ConfigController', | |
'ZFTool\\Controller\\Module' => 'ZFTool\\Controller\\ModuleController', | |
'ZFTool\\Controller\\Classmap' => 'ZFTool\\Controller\\ClassmapController', | |
'ZFTool\\Controller\\Create' => 'ZFTool\\Controller\\CreateController', | |
'ZFTool\\Controller\\Install' => 'ZFTool\\Controller\\InstallController', | |
'ZFTool\\Controller\\Diagnostics' => 'ZFTool\\Controller\\DiagnosticsController', | |
'ZF\\Apigility\\Admin\\Controller\\App' => 'ZF\\Apigility\\Admin\\Controller\\AppController', | |
), | |
'abstract_factories' => | |
array ( | |
0 => 'ZF\\Rest\\Factory\\RestControllerFactory', | |
1 => 'ZF\\Rpc\\Factory\\RpcControllerFactory', | |
), | |
), | |
'view_manager' => | |
array ( | |
'display_not_found_reason' => true, | |
'display_exceptions' => false, | |
'doctype' => 'HTML5', | |
'not_found_template' => 'error/404', | |
'exception_template' => 'error/index', | |
'template_map' => | |
array ( | |
'layout/layout' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/layout/layout.phtml', | |
'application/index/index' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/application/index/index.phtml', | |
'error/404' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/error/404.phtml', | |
'error/index' => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view/error/index.phtml', | |
'zf-tool/diagnostics/run' => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zendframework/zftool/config/../view/diagnostics/run.phtml', | |
'zf/app/app' => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-admin/config/../view/app.phtml', | |
), | |
'template_path_stack' => | |
array ( | |
0 => '/var/www/miei/zend/zf-apigility-skeleton/module/Application/config/../view', | |
'zf-apigility-welcome' => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-welcome/config/../view', | |
), | |
), | |
'console' => | |
array ( | |
'router' => | |
array ( | |
'routes' => | |
array ( | |
'development-disable' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'development disable', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\DevelopmentMode', | |
'action' => 'disable', | |
), | |
), | |
), | |
'development-enable' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'development enable', | |
'defaults' => | |
array ( | |
'controller' => 'Application\\Controller\\DevelopmentMode', | |
'action' => 'enable', | |
), | |
), | |
), | |
'zftool-version' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'version', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Info', | |
'action' => 'version', | |
), | |
), | |
), | |
'zftool-version2' => | |
array ( | |
'options' => | |
array ( | |
'route' => '--version', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Info', | |
'action' => 'version', | |
), | |
), | |
), | |
'zftool-config-list' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'config list [--local|-l]:local', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Config', | |
'action' => 'list', | |
), | |
), | |
), | |
'zftool-config' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'config <action> [<arg1>] [<arg2>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Config', | |
'action' => 'get', | |
), | |
), | |
), | |
'zftool-classmap-generate' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'classmap generate <directory> [<destination>] [--append|-a] [--overwrite|-w]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Classmap', | |
'action' => 'generate', | |
), | |
), | |
), | |
'zftool-modules-list' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'modules [list]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Module', | |
'action' => 'list', | |
), | |
), | |
), | |
'zftool-create-project' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create project <path>', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'project', | |
), | |
), | |
), | |
'zftool-create-module' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create module <name> [<path>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'module', | |
), | |
), | |
), | |
'zftool-create-controller' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create controller <name> <module> [<path>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'controller', | |
), | |
), | |
), | |
'zftool-create-action' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'create action <name> <controllerName> <module>', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Create', | |
'action' => 'method', | |
), | |
), | |
), | |
'zftool-install-zf' => | |
array ( | |
'options' => | |
array ( | |
'route' => 'install zf <path> [<version>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Install', | |
'action' => 'zf', | |
), | |
), | |
), | |
'zftool-diagnostics' => | |
array ( | |
'options' => | |
array ( | |
'route' => '(diagnostics|diag) [-v|--verbose]:verbose [--debug] [-q|--quiet]:quiet [-b|--break]:break [<testGroupName>]', | |
'defaults' => | |
array ( | |
'controller' => 'ZFTool\\Controller\\Diagnostics', | |
'action' => 'run', | |
), | |
), | |
), | |
), | |
), | |
), | |
'asset_manager' => | |
array ( | |
'resolver_configs' => | |
array ( | |
'paths' => | |
array ( | |
0 => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility/config/../asset', | |
1 => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-welcome/config/../asset', | |
2 => '/var/www/miei/zend/zf-apigility-skeleton/vendor/zfcampus/zf-apigility-admin/config/../asset', | |
), | |
), | |
'resolvers' => | |
array ( | |
'AssetManager\\Resolver\\MapResolver' => 2000, | |
'AssetManager\\Resolver\\CollectionResolver' => 1500, | |
'AssetManager\\Resolver\\PrioritizedPathsResolver' => 1000, | |
'AssetManager\\Resolver\\PathStackResolver' => 500, | |
), | |
), | |
'zf-apigility' => | |
array ( | |
'db-connected' => | |
array ( | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusResource' => | |
array ( | |
'controller_service_name' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller', | |
'adapter_name' => 'Db\\Status', | |
'table_name' => 'status', | |
'identifier_name' => 'id', | |
'hydrator_name' => 'ClassMethods', | |
), | |
), | |
), | |
'zf-api-problem' => | |
array ( | |
'render_error_controllers' => | |
array ( | |
0 => 'ZF\\Configuration\\ConfigController', | |
), | |
), | |
'zf-hal' => | |
array ( | |
'renderer' => | |
array ( | |
), | |
'metadata_map' => | |
array ( | |
'ZF\\Apigility\\Admin\\Model\\DbConnectedRestServiceEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'controller_service_name', | |
'route_name' => 'zf-apigility-admin/api/module/rest-service', | |
), | |
'ZF\\Apigility\\Admin\\Model\\DbAdapterEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'adapter_name', | |
'route_name' => 'zf-apigility-admin/api/db-adapter', | |
), | |
'ZF\\Apigility\\Admin\\Model\\ModuleEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'name', | |
'route_name' => 'zf-apigility-admin/api/module', | |
), | |
'ZF\\Apigility\\Admin\\Model\\RestServiceEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'controller_service_name', | |
'route_name' => 'zf-apigility-admin/api/module/rest-service', | |
), | |
'ZF\\Apigility\\Admin\\Model\\RpcServiceEntity' => | |
array ( | |
'hydrator' => 'ArraySerializable', | |
'identifier_name' => 'controller_service_name', | |
'route_name' => 'zf-apigility-admin/api/module/rpc-service', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusEntity' => | |
array ( | |
'hydrator' => 'ClassMethods', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusCollection' => | |
array ( | |
'is_collection' => '1', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
'ZF\\Apigility\\Example\\V2\\Rest\\Status\\StatusEntity' => | |
array ( | |
'hydrator' => 'ClassMethods', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
'ZF\\Apigility\\Example\\V2\\Rest\\Status\\StatusCollection' => | |
array ( | |
'is_collection' => '1', | |
'route_name' => 'zf-apigility-example.rest.status', | |
), | |
), | |
), | |
'zf-content-negotiation' => | |
array ( | |
'selectors' => | |
array ( | |
'HalJson' => | |
array ( | |
'ZF\\Hal\\View\\HalJsonModel' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
'Json' => | |
array ( | |
'ZF\\ContentNegotiation\\JsonModel' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
), | |
'controllers' => | |
array ( | |
'ZF\\Configuration\\ConfigController' => 'Json', | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\Module' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => 'HalJson', | |
'ZF\\Apigility\\Admin\\Controller\\Source' => 'Json', | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => 'Json', | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => 'Json', | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => 'HalJson', | |
), | |
'accept-whitelist' => | |
array ( | |
'ZF\\Configuration\\ConfigController' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/vnd.zfcampus.v1.config+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Module' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Source' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
'content-type-whitelist' => | |
array ( | |
'ZF\\Configuration\\ConfigController' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/vnd.zfcampus.v1.config+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Module' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Source' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => | |
array ( | |
0 => 'application/json', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => | |
array ( | |
0 => 'application/json', | |
1 => 'application/*+json', | |
), | |
), | |
), | |
'controller_plugins' => | |
array ( | |
'invokables' => | |
array ( | |
'routeParam' => 'ZF\\ContentNegotiation\\ControllerPlugin\\RouteParam', | |
'queryParam' => 'ZF\\ContentNegotiation\\ControllerPlugin\\QueryParam', | |
'bodyParam' => 'ZF\\ContentNegotiation\\ControllerPlugin\\BodyParam', | |
'routeParams' => 'ZF\\ContentNegotiation\\ControllerPlugin\\RouteParams', | |
'queryParams' => 'ZF\\ContentNegotiation\\ControllerPlugin\\QueryParams', | |
'bodyParams' => 'ZF\\ContentNegotiation\\ControllerPlugin\\BodyParams', | |
), | |
), | |
'zf-rest' => | |
array ( | |
'ZF\\Apigility\\Admin\\Controller\\DbAdapter' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\DbAdapterResource', | |
'route_name' => 'zf-apigility-admin/api/db-adapter', | |
'identifier_name' => 'adapter_name', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\DbAdapterEntity', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'DELETE', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'db_adapter', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Module' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\ModuleResource', | |
'route_name' => 'zf-apigility-admin/api/module', | |
'identifier_name' => 'name', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\ModuleEntity', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'module', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RpcService' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\RpcServiceResource', | |
'route_name' => 'zf-apigility-admin/api/module/rpc-service', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\RpcServiceEntity', | |
'identifier_name' => 'controller_service_name', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'DELETE', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'rpc', | |
'collection_query_whitelist' => | |
array ( | |
0 => 'version', | |
), | |
), | |
'ZF\\Apigility\\Admin\\Controller\\RestService' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Admin\\Model\\RestServiceResource', | |
'route_name' => 'zf-apigility-admin/api/module/rest-service', | |
'entity_class' => 'ZF\\Apigility\\Admin\\Model\\RestServiceEntity', | |
'identifier_name' => 'controller_service_name', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'DELETE', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'collection_name' => 'rest', | |
'collection_query_whitelist' => | |
array ( | |
0 => 'version', | |
), | |
), | |
'ZF\\Apigility\\Example\\V1\\Rest\\Status\\Controller' => | |
array ( | |
'listener' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusResource', | |
'collection_name' => 'status', | |
'page_size' => '10', | |
'route_name' => 'zf-apigility-example.rest.status', | |
'resource_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
2 => 'PUT', | |
), | |
'collection_http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'POST', | |
), | |
'entity_class' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusEntity', | |
'collection_class' => 'ZF\\Apigility\\Example\\V1\\Rest\\Status\\StatusCollection', | |
), | |
), | |
'zf-rpc' => | |
array ( | |
'ZF\\Apigility\\Admin\\Controller\\ModuleCreation' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'PUT', | |
), | |
'route_name' => 'zf-apigility-admin/api/module-enable', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Source' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'GET', | |
), | |
'route_name' => 'zf-apigility-admin/api/source', | |
), | |
'ZF\\Apigility\\Admin\\Controller\\Versioning' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'PATCH', | |
), | |
'route_name' => 'zf-apigility-admin/api/versioning', | |
), | |
'ZF\\Configuration\\ConfigController' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
), | |
'route_name' => 'zf-apigility-admin/api/config', | |
), | |
'ZF\\Configuration\\ModuleConfigController' => | |
array ( | |
'http_methods' => | |
array ( | |
0 => 'GET', | |
1 => 'PATCH', | |
), | |
'route_name' => 'zf-apigility-admin/api/config/module', | |
), | |
'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\Controller' => | |
array ( | |
'http_methods' => | |
array ( | |
), | |
'route_name' => 'zf-apigility-example.rpc.hello-world', | |
'callable' => 'ZF\\Apigility\\Example\\V1\\Rpc\\HelloWorld\\HelloWorldController::hello', | |
), | |
), | |
'zf-configuration' => | |
array ( | |
'config-file' => 'config/autoload/development.php', | |
), | |
'zf-versioning' => | |
array ( | |
'content-type' => | |
array ( | |
), | |
'uri' => | |
array ( | |
), | |
), | |
'ZFTool' => | |
array ( | |
'disable_usage' => false, | |
), | |
'diagnostics' => | |
array ( | |
'ZF' => | |
array ( | |
'PHP Version' => | |
array ( | |
0 => 'ZFTool\\Diagnostics\\Test\\PhpVersion', | |
1 => '5.3.3', | |
), | |
), | |
), | |
'db' => | |
array ( | |
'adapters' => | |
array ( | |
'Db\\Status' => | |
array ( | |
'driver' => 'Pdo_Sqlite', | |
'database' => '/var/www/miei/zend/zf-apigility-skeleton/data/db/status.db', | |
), | |
), | |
), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2 years old Dell Poweredge R210 | |
$ php -v | |
PHP 5.4.20 (cli) (built: Sep 26 2013 12:46:44) | |
Copyright (c) 1997-2013 The PHP Group | |
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies | |
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans | |
$ git checkout master | |
Switched to branch 'master' | |
$ php ../bench/bench.php | |
cycling 1000 times | |
merge arrays | |
total time: 0.18602871894836 | |
mean time: 0.00018602871894836 | |
merge with a traversable | |
total time: 0.11960816383362 | |
mean time: 0.00011960816383362 | |
$ php ../bench/bench.php 10000 | |
cycling 10000 times | |
merge arrays | |
total time: 1.8466186523438 | |
mean time: 0.00018466186523438 | |
merge with a traversable | |
total time: 1.1822235584259 | |
mean time: 0.00011822235584259 | |
$ git checkout update/arrayutils-merge-traversables | |
Switched to branch 'update/arrayutils-merge-traversables' | |
$ php ../bench/bench.php | |
cycling 1000 times | |
merge arrays | |
total time: 0.21110677719116 | |
mean time: 0.00021110677719116 | |
merge with a traversable | |
total time: 0.32738518714905 | |
mean time: 0.00032738518714905 | |
$ php ../bench/bench.php 10000 | |
cycling 10000 times | |
merge arrays | |
total time: 2.1763880252838 | |
mean time: 0.00021763880252838 | |
merge with a traversable | |
total time: 3.3652377128601 | |
mean time: 0.00033652377128601 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment