2017 © Pedro Peláez
 

library php-settings-middleware

PHP settings managing middleware

image

atukai/php-settings-middleware

PHP settings managing middleware

  • Wednesday, October 5, 2016
  • by atukai
  • Repository
  • 1 Watchers
  • 1 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Php Settings Middleware

Managing php settings., (*1)

Installation

composer require atukai/php-settings-middleware, (*2)

Configuration

To configure the php settings as you required, add the following to your config file under php_setting key:, (*3)

'php_settings' => [
    'display_startup_errors'     => false,
    'display_errors'             => true,
    'max_execution_time'         => 30,
    'date.timezone'              => 'UTC',

    'routes' => [
        'home' => [
            'memory_limit'       => '32M',
            'max_execution_time' => '60',
        ],
    ],
]

Add factory to container config, (*4)

    'dependencies' => [
        'factories' => [
            ...
            \At\PhpSettings\PhpSettingsMiddleware::class => \At\PhpSettings\PhpSettingsMiddlewareFactory::class,
            ...
        ],
    ],

Add the middleware to the pipeline, (*5)

    'middleware' => [
        ...
        \At\PhpSettings\PhpSettingsMiddleware::class,
        ...
    ],  

PHP Ini Configurations

For more details of PHP ini configurations see, (*6)

  1. http://php.net/manual/en/ini.list.php
  2. http://php.net/manual/en/configuration.changes.modes.php

The Versions

05/10 2016

dev-master

9999999-dev https://github.com/atukai/php-settings-middleware

PHP settings managing middleware

  Sources   Download

The Requires

  • php ^5.6 || ^7.0

 

middleware settings php