A PHP client for accessing the MonkCMS API in non-website environments.

author Monk Development, Inc.
package Default

 Methods

Constructor.

__construct(array $config = array()) : \Monk\Cms
fluent This method is part of a fluent interface and will return the same instance

Parameters

$config

array

Config values.

Returns

\Monk\Cms

Request content from the API.

get() : array

Parameters can be in one of two formats:

  • A slash-separated string (module/display[/find]), followed by an optional array of additional parameters.
  • An array with all of the parameters.

Exceptions

\Monk\Cms\Exception If the request fails.

Returns

arrayJSON-decoded associative array.

Get the config values.

getConfig() : array

Includes the default config values for any values that weren't set.

Returns

array

Set the config values.

setConfig(array $config) : \Monk\Cms

If a value isn't set, the default config value is used.

fluent This method is part of a fluent interface and will return the same instance

Parameters

$config

array

Returns

\Monk\Cms

Set the default config values to fall back to when a value isn't set.

setDefaultConfig(array $defaultConfig) : array
Static

The new values are merged with the old ones, so not all values must be specified.

Parameters

$defaultConfig

array

Returns

arrayNew default config values.