Overview

Namespaces

  • momentphp
    • exceptions
    • interfaces
    • middlewares
    • providers
    • traits
  • None

Classes

  • App
  • Bundle
  • Cache
  • CallableResolver
  • Config
  • Controller
  • Database
  • DebugInfo
  • Error
  • ExceptionHandler
  • FlashMessages
  • Helper
  • Log
  • Middleware
  • Model
  • ObjectCache
  • Provider
  • Registry
  • Router
  • Settings
  • SmartyViewEngine
  • Template
  • TwigViewEngine
  • View
  • Overview
  • Namespace
  • Class

Class Config

Config

momentphp\Config implements ArrayAccess
Namespace: momentphp
Located at Config.php
Methods summary
public
# __construct( array $configDirs, string $environment = 'production' )

Constructor

Constructor

Parameters

$configDirs
$environment
public mixed
# get( string $key, mixed $default = null )

Get the specified configuration value

Get the specified configuration value

Parameters

$key
$default

Returns

mixed
public
# set( string $key, mixed $value )

Set a given configuration value

Set a given configuration value

Parameters

$key
$value
public boolean
# has( string $key )

Determine if the given configuration value exists

Determine if the given configuration value exists

Parameters

$key

Returns

boolean
public boolean
# hasGroup( string $key )

Determine if a configuration group exists

Determine if a configuration group exists

Parameters

$key

Returns

boolean
public array
# getItems( )

Get all of the configuration items

Get all of the configuration items

Returns

array
public array
# getConfigDirs( )

Get directories to search config files for

Get directories to search config files for

Returns

array
public string
# getEnvironment( )

Get current configuration environment

Get current configuration environment

Returns

string
protected array
# parseKey( string $key )

Parse a key into group and item

Parse a key into group and item

Parameters

$key

Returns

array
protected array
# parseBasicSegments( array $segments )

Parse an array of basic segments

Parse an array of basic segments

Parameters

$segments

Returns

array
protected
# load( string $group )

Load the configuration group for the key

Load the configuration group for the key

Parameters

$group
protected array
# loadItems( string $environment, string $group )

Load the given configuration group

Load the given configuration group

Parameters

$environment
$group

Returns

array
public boolean
# exists( string $group )

Determine if the given group exists

Determine if the given group exists

Parameters

$group

Returns

boolean
protected array
# mergeEnvironment( array $items, string $file )

Merge the items in the given file into the items

Merge the items in the given file into the items

Parameters

$items
$file

Returns

array
protected mixed
# getRequire( string $path )

Get the returned value of a file

Get the returned value of a file

Parameters

$path

Returns

mixed
public boolean
# offsetExists( string $key )

Determine if the given configuration option exists

Determine if the given configuration option exists

Parameters

$key

Returns

boolean

Implementation of

ArrayAccess::offsetExists()
public mixed
# offsetGet( string $key )

Get a configuration option

Get a configuration option

Parameters

$key

Returns

mixed

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( string $key, mixed $value )

Set a configuration option

Set a configuration option

Parameters

$key
$value

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( string $key )

Unset a configuration option

Unset a configuration option

Parameters

$key

Implementation of

ArrayAccess::offsetUnset()
public array
# files( )

Returns unique config file names across all config dirs

Returns unique config file names across all config dirs

Returns

array
Properties summary
protected string $environment

Current configuration environment

Current configuration environment

#
protected array $configDirs

Directories to search config files for

Directories to search config files for

# []
protected array $parsed

Parsed configuration keys cache

Parsed configuration keys cache

# []
protected array $exists

Existing groups cache

Existing groups cache

# []
protected array $items

All of the configuration items

All of the configuration items

# []
MomentPHP API documentation generated by ApiGen