A simple libraty to change PHP directives in your application., (*1)
Installation
Composer (https://getcomposer.org/) and (https://packagist.org/), (*2)
composer require helionogueir/changedirective
Usage
helionogueir\changedirective\cgi\Debug
Define debug mode as "Developer", (*3)
use helionogueir\changedirective\cgi\Debug;
(new Debug())->set(Debug::DEVELOPER);
Define debug mode as "Homologation", (*4)
use helionogueir\changedirective\cgi\Debug;
(new Debug())->set(Debug::HOMOLOGATION);
Define debug mode as "Production", (*5)
use helionogueir\changedirective\cgi\Debug;
(new Debug())->set(Debug::PRODUCTION);
helionogueir\changedirective\cgi\Locale
Define locale as "English, USA", and collate as "UTF-8", (*6)
use helionogueir\changedirective\cgi\Locale;
(new Locale())->set("en-US", "utf-8")
helionogueir\changedirective\cgi\Session
Define session behavior and start session, (*7)
use helionogueir\changedirective\cgi\Session;
(new Session())
// Optional: Define session lifetime
->setMaxLifetime(3600)
// Optional: Define session path storage files
->setPath(sys_get_temp_dir())
// Start sesson
->start());
helionogueir\changedirective\cgi\Timezone
Define Locale as "London, England" (https://secure.php.net/manual/timezones.php), (*8)
use helionogueir\changedirective\cgi\Timezone;
(new Timezone())->set("Europe/London");
TDD (Test Driven Development)
PHPUnit (https://phpunit.de/), (*9)
phpunit -c ./changedirective/tests/unit.xml