Overview

Namespaces

  • Core
    • Auth
    • Exceptions
    • Helpers
    • Providers
  • Kernel
    • Dispatch
    • Providers
  • None
  • Vendor
    • ExampleVendor

Classes

  • Config
  • Service
  • Session
  • Overview
  • Namespace
  • Class
  • Download

Class Config

Loads and sets *.ini files, which are the configuration files for the Framework.

Namespace: Core\Providers
Package: Core
Located at app/Kernel/Providers/Config.php
Methods summary
public static Core\Providers\Config
# singleton( )

Returns the Config instance, creating it if it did not exist.

Returns the Config instance, creating it if it did not exist.

Returns

Core\Providers\Config
public Core\Providers\Config
# set( string $key, mixed $value = NULL )

Sets a $value to a given $key

Sets a $value to a given $key

Parameters

$key
$value

Returns

Core\Providers\Config
public mixed|null
# get( string $key, string|boolean $subKey = FALSE )

Gets the $value of a given $key

Gets the $value of a given $key

Parameters

$key
$subKey

Returns

mixed|null
$value associated to the $key or NULL
public Core\Providers\Config
# load( string|boolean $path = FALSE, string|boolean $absolute = FALSE, string|boolean $iniKey = FALSE, string|boolean $namespace = FALSE )

Loads an ini file

Loads an ini file

Parameters

$path
The file (path+file) to load
$absolute
If not specified, the file will be searched inside /config folder
$iniKey
= FALSE If specified, all the ini file will be saved under that key
$namespace
= FALSE If specified, the globals will be defined inside the namespace

Returns

Core\Providers\Config
public Core\Providers\Config
# setGlobals( array $globals, string| $namespace = "" )

Loads global vars from an .ini file

Loads global vars from an .ini file

Parameters

$globals
The globals to load
$namespace
If specified, the globals will be defined inside the namespace

Returns

Core\Providers\Config
public Core\Providers\Config
# setPHPIniParams( string|boolean $path = FALSE )

Loads the ini_set parameters from an .ini file

Loads the ini_set parameters from an .ini file

Parameters

$path

Returns

Core\Providers\Config
public Core\Providers\Config
# loadVendors( boolean|false $saveToCache = FALSE )

Loads the extra permission.ini and routing.ini from /src/vendor folders

Loads the extra permission.ini and routing.ini from /src/vendor folders

Parameters

$saveToCache
Save in /app/cache a config which loads all vendor *.ini and includes.

Returns

Core\Providers\Config

Throws

Exception
if directory doesn't exist
public array
# saveVendorCache( )

Saves the private global var $this->cacheIni to the vendor_ini.ini file

Saves the private global var $this->cacheIni to the vendor_ini.ini file

Returns

array
With information about success or failure
public array
# getLoadedConfig( )

Returns the private $vars

Returns the private $vars

Returns

array
$vars
Ribosome API documentation generated by ApiGen