helionogueir/changedirective

A simple libraty to change PHP directives in your application

Installs: 39

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/helionogueir/changedirective

v1.0.0 2016-12-09 17:23 UTC

This package is not auto-updated.

Last update: 2025-10-20 17:59:16 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