# Class AlphaConfig

A singleton config class

Package: alpha::util
Copyright: Copyright (c) 2012, John Collins (founder of Alpha Framework). All rights reserved.

    Redistribution and use in source and binary forms, with or
    without modification, are permitted provided that the
    following conditions are met:

    * Redistributions of source code must retain the above
      copyright notice, this list of conditions and the
      following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the
      following disclaimer in the documentation and/or other
      materials provided with the distribution.
    * Neither the name of the Alpha Framework nor the names
      of its contributors may be used to endorse or promote
      products derived from this software without specific
      prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
    NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

License: The BSD License
Author: John Collins <dev@alphaframework.org>
Version: $Id: AlphaConfig.inc 1583 2012-11-05 23:05:20Z alphadevx $
Since: 1.0
Located at util/AlphaConfig.inc

Methods summary
`private` | # `__construct( )` Private constructor means the class cannot be instantiated from elsewhere Private constructor means the class cannot be instantiated from elsewhere #### Since 1.0
`public static `AlphaConfig`` | # `getInstance( )` Get the config object instance Get the config object instance #### Returns ``AlphaConfig`` #### Since 1.0
`public string` | # `get( mixed $key )` Get config value Get config value #### Parameters $key `mixed` $key string #### Returns `string` #### Throws ``IllegalArguementException`` #### Since 1.0
`public` | # `set( mixed $key, mixed $val )` Set config value Set config value #### Parameters $key `mixed` $key string $val `mixed` $val string #### Since 1.0
`private` | # `setRootPath( )` Sets the root directory of the application Sets the root directory of the application #### Since 1.0
`private` | # `setIncludePath( )` Attempt to set the include_path to include the alpha/lib directory Attempt to set the include_path to include the alpha/lib directory #### Since 1.0
`private` | # `loadConfig( )` Loads the config from the relevent .ini file, dependant upon the current environment (hostname). Note that this method will die() on failure! Loads the config from the relevent .ini file, dependant upon the current environment (hostname). Note that this method will die() on failure! #### Since 1.0

Properties summary
`private array` | $configVars | `array()` | # Array to store the config variables Array to store the config variables #### Since 1.0
`private static `AlphaConfig`` | $instance | `` | # The config object singleton The config object singleton #### Since 1.0