Skip to content

PrimalPHP/Environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6ab0b4e · Nov 13, 2012

History

4 Commits
Sep 16, 2012
Sep 17, 2012
Sep 16, 2012
Nov 13, 2012

Repository files navigation

#Primal.Environment

Created and Copyright 2012 by Jarvis Badgley, chiper at chipersoft dot com.

Environment is a very simple data storage class for saving and retrieving environmental configuration variables, such as would be defined in a project's config file.

  • Any value can be stored or retrieved by calling a function with the name, prefixed by get or set.
  • Example: $env->setConvertPath('/path/to/convert') or $env->getConvertPath()
  • Values can also be set or retrieved directly by name: $env->convertPath
  • Set functions return $this to allow chaining
  • Any undefined value will retrieve as null

##Example:

//config.php
Environment::Singleton()
    ->setName('development')
    ->setDBName('PrimalTest')
    ->setDBUser('php')
    ->setDBPassword('Ornare856')
    ->setDebug(true)
;

About

Very basic PHP environmental settings management library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published