array _getStatesReturnedByAction(
mixed
$callback)
|
|
Analyzes callback for possible new state(s) returned
PHP version 5
This methods requires the use of the Reflection API to parse the doc block and looks for the @return declaration.
If the callback shall return new states, @return should specify a string followed by a
containing a list of new states inside <li></li> tags.
Example of doc block for action callback: /**
* This method does something then returns a new status
*
* \@param string $symbol
* \@param mixed $payload
*
* \@return string One of
* <ul>
* <li>RIPE</li>
* <li>NOT_RIPE</li>
* <ul>
* \@access public
*/
function checkRipeness($symbol, $payload)
{
return ($symbol == 'Orange') ? 'RIPE' : 'NOT_RIPE';
}
Parameters: