helionogueir / changedirective
A simple libraty to change PHP directives in your application
v1.0.0
2016-12-09 17:23 UTC
Requires
- php: >=7.0
- helionogueir/languagepack: v1.1.0
This package is not auto-updated.
Last update: 2024-12-16 14:03:15 UTC
README
A simple libraty to change PHP directives in your application.
Installation
Composer (https://getcomposer.org/) and (https://packagist.org/)
composer require helionogueir/changedirective
Usage
helionogueir\changedirective\cgi\Debug
Define debug mode as "Developer"
use helionogueir\changedirective\cgi\Debug; (new Debug())->set(Debug::DEVELOPER);
Define debug mode as "Homologation"
use helionogueir\changedirective\cgi\Debug; (new Debug())->set(Debug::HOMOLOGATION);
Define debug mode as "Production"
use helionogueir\changedirective\cgi\Debug; (new Debug())->set(Debug::PRODUCTION);
helionogueir\changedirective\cgi\Locale
Define locale as "English, USA", and collate as "UTF-8"
use helionogueir\changedirective\cgi\Locale; (new Locale())->set("en-US", "utf-8")
helionogueir\changedirective\cgi\Session
Define session behavior and start session
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)
use helionogueir\changedirective\cgi\Timezone; (new Timezone())->set("Europe/London");
TDD (Test Driven Development)
PHPUnit (https://phpunit.de/)
phpunit -c ./changedirective/tests/unit.xml