Perforce Chronicle 2012.2/486814
API Documentation

Workflow_PluginAbstract Class Reference

Base class for workflow plugins (conditions and actions). More...

Inheritance diagram for Workflow_PluginAbstract:
Workflow_ActionAbstract Workflow_ConditionAbstract Workflow_Workflow_Action_Noop Workflow_Workflow_Action_SendEmail Workflow_Workflow_Condition_Contains Workflow_Workflow_Condition_False

List of all members.

Public Member Functions

 __construct (array $options=array())
 Create a new plugin instance and (optionally) set plugin options.
 getOption ($key)
 Get single option.
 getOptions ()
 Get options attached to the plugin.
 setOptions (array $options)
 Set options for this plugin.

Protected Attributes

 $_options = array()

Detailed Description

Base class for workflow plugins (conditions and actions).

This abstract class provides basic handling of options.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Constructor & Destructor Documentation

Workflow_PluginAbstract::__construct ( array $  options = array())

Create a new plugin instance and (optionally) set plugin options.

Parameters:
array$optionsoptions to set for this plugin.
    {
        $this->setOptions($options);
    }

Member Function Documentation

Workflow_PluginAbstract::getOption ( key)

Get single option.

Parameters:
string$keykey to get option value for.
Returns:
mixed|null option with given key, or null if option not found.
    {
        $key = (string) $key;
        return isset($this->_options[$key]) ? $this->_options[$key] : null;
    }
Workflow_PluginAbstract::getOptions ( )

Get options attached to the plugin.

Returns:
array plugin options.
    {
        return $this->_options;
    }
Workflow_PluginAbstract::setOptions ( array $  options)

Set options for this plugin.

Parameters:
array$optionsplugin options to set.
    {
        $this->_options = $options;
    }

Member Data Documentation

Workflow_PluginAbstract::$_options = array() [protected]

The documentation for this class was generated from the following file: