PHP Class Swiftriver\Core\Workflows\EventHandlers\EventHandlersBase

Author: mg[at]swiftly[dot]org
Inheritance: extends Swiftriver\Core\Workflows\WorkflowBase
Show file Open project: ushahidi/Swiftriver-2011

Public Methods

Method Description
ParseHandlersToJson ( Swiftriver\Core\EventDistribution\IEventHandler[] $handlers ) Parses a collection of IEventHandlers into well formed JSON
ParseJsonToEventHandlerConfiguration ( string $json ) : AssociativeArray Given a json string this function will attemp to extract the associative array of configuration options or throw an InvalidArgumentException
ParseJsonToEventHandlerName ( string $json ) : string Given a string of JSON this function parses it and returns the name property or throws an InvalidArgumentException

Method Details

ParseHandlersToJson() public method

Parses a collection of IEventHandlers into well formed JSON
public ParseHandlersToJson ( Swiftriver\Core\EventDistribution\IEventHandler[] $handlers )
$handlers Swiftriver\Core\EventDistribution\IEventHandler[]

ParseJsonToEventHandlerConfiguration() public method

Given a json string this function will attemp to extract the associative array of configuration options or throw an InvalidArgumentException
public ParseJsonToEventHandlerConfiguration ( string $json ) : AssociativeArray
$json string
return AssociativeArray

ParseJsonToEventHandlerName() public method

Given a string of JSON this function parses it and returns the name property or throws an InvalidArgumentException
public ParseJsonToEventHandlerName ( string $json ) : string
$json string
return string