diff options
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/swig/php/uscxml.i | 12 | ||||
-rw-r--r-- | src/bindings/swig/php/uscxmlNativePHP.php | 20 |
2 files changed, 26 insertions, 6 deletions
diff --git a/src/bindings/swig/php/uscxml.i b/src/bindings/swig/php/uscxml.i index 5f0b930..5dd59b9 100644 --- a/src/bindings/swig/php/uscxml.i +++ b/src/bindings/swig/php/uscxml.i @@ -42,6 +42,18 @@ void*** tsrm_ls; %ignore uscxml::InterpreterImpl; //*********************************************** +// Beautify interpreter class +//*********************************************** + +%ignore uscxml::Interpreter::isAtomic(Arabica::DOM::Node<std::string>); +%extend uscxml::Interpreter { + bool isAtomic(const std::string stateId) { + Arabica::DOM::Node<std::string> state = self->getState(stateId); + return self->isAtomic(state); + } +} + +//*********************************************** // Parse the header file to generate wrappers //*********************************************** diff --git a/src/bindings/swig/php/uscxmlNativePHP.php b/src/bindings/swig/php/uscxmlNativePHP.php index e7ef93d..61e7c2e 100644 --- a/src/bindings/swig/php/uscxmlNativePHP.php +++ b/src/bindings/swig/php/uscxmlNativePHP.php @@ -274,8 +274,12 @@ class Event { return $r; } - function setData($invokeId) { - Event_setData($this->_cPtr,$invokeId); + function setData($data) { + Event_setData($this->_cPtr,$data); + } + + function initContent($content) { + Event_initContent($this->_cPtr,$content); } static function fromXML($xmlString) { @@ -747,10 +751,6 @@ class Interpreter { return Interpreter_isTargetless($transition); } - static function isAtomic($state) { - return Interpreter_isAtomic($state); - } - static function isFinal($state) { return Interpreter_isFinal($state); } @@ -832,6 +832,14 @@ class Interpreter { static function getUUID() { return Interpreter_getUUID(); } + + function isAtomic($stateId=null) { + switch (func_num_args()) { + case 0: $r=Interpreter_isAtomic($this->_cPtr); break; + default: $r=Interpreter_isAtomic($this->_cPtr,$stateId); + } + return $r; + } } class InterpreterMonitor { |