\DewdropConfig

This class manages the basic Dewdrop configuration needed to get things up and running. For Dewdrop to run, it needs two pieces of information at a minimum:

1) The Bootstrap class that will provide the Pimple depedency injection container.

2) The database configuration.

In WP plugin projects, this information can be provided automatically using information from the WordPress environment itself. In other projects, you'll have to provide a Bootstrap class yourself.

Note that you can use array access semantics with this object.

Summary

Methods
Properties
Constants
__construct()
get()
has()
offsetSet()
offsetGet()
offsetExists()
offsetUnset()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$data
N/A

Properties

$data

$data : array

The configuration data.

Type

array

Methods

__construct()

__construct(\Dewdrop\Env\EnvInterface  $env = null, string  $file = null) 

Optionally point this class at a non-standard configuration file path.

Parameters

\Dewdrop\Env\EnvInterface $env
string $file

get()

get(string  $key) : mixed

Get the named section from the configuration.

Parameters

string $key

Returns

mixed

has()

has(string  $key) : boolean

Check to see if the named configuration section exists.

Parameters

string $key

Returns

boolean

offsetSet()

offsetSet(string  $key, mixed  $value) : void

Set the value for the named configuration section.

Parameters

string $key
mixed $value

offsetGet()

offsetGet(string  $key) : mixed

Retrieve the named section from the configuration.

Parameters

string $key

Throws

\Dewdrop\InvalidArgumentException

Returns

mixed

offsetExists()

offsetExists(string  $key) : boolean

Checks if a parameter or an object is set.

Parameters

string $key

The unique identifier for the config section

Returns

boolean

offsetUnset()

offsetUnset(string  $key) 

Unsets a parameter or an object.

Parameters

string $key

The unique identifier for the parameter or object