Class for server configuration validation

This is used to validate the config.php settings
license New BSD License
link for the canonical source repository
author Ingo Walz
category Zend
package Zend_Service
subpackage ZendServerAPI

 Methods

Constructor for ConfigValidation

__construct(string $fileName) 

Parameters

$fileName

string

Exceptions

\RuntimeException if config file is not found

Get the config array

getConfig(string $name) : array

Parameters

$name

string

Name for the current config

Returns

array

Get settings array

getSettings() : array

Returns

array

api key value validation

checkForValidAPIKey(string $apiKey) : void

Parameters

$apiKey

string

The apikey to validate

Exceptions

\InvalidArgumentException

Validate all required parameters for the Zend Server API connection

validate(string $name) : void

Parameters

$name

string

Name for the config section to use

Exceptions

\InvalidArgumentException If error in config array

Test for existing settings section and valid values

validateSettings(array $config) : void

Parameters

$config

array

Config array

Exceptions

\RuntimeException If settings section is missing

 Properties

 

$config : array
 

$fileName : string