PHP Class DataSift\Storyplayer\DefinitionLib\TestEnvironment_RolesValidator

Show file Open project: datasift/storyplayer Class Usage Examples

Protected Properties

Property Type Description
$host TestEnvironment_HostDefinition the host we are checking out roles for

Public Methods

Method Description
__construct ( TestEnvironment_HostDefinition $host ) constructor
validate ( mixed $roles ) : void validate a set of roles

Protected Methods

Method Description
validateMustBeArray ( mixed $roles ) : void make sure that the roles are an array
validateMustBeKeyValuePairs ( array $roles ) : void make sure that the roles are simple key / value pairs

Method Details

__construct() public method

constructor
public __construct ( TestEnvironment_HostDefinition $host )
$host TestEnvironment_HostDefinition the host that we are validating roles for

validate() public method

throws an exception if there's anything wrong with the roles
public validate ( mixed $roles ) : void
$roles mixed the roles to validate
return void

validateMustBeArray() protected method

make sure that the roles are an array
protected validateMustBeArray ( mixed $roles ) : void
$roles mixed the roles to check
return void

validateMustBeKeyValuePairs() protected method

make sure that the roles are simple key / value pairs
protected validateMustBeKeyValuePairs ( array $roles ) : void
$roles array the roles to check
return void

Property Details

$host protected property

the host we are checking out roles for
protected TestEnvironment_HostDefinition,DataSift\Storyplayer\DefinitionLib $host
return TestEnvironment_HostDefinition