pear / FSM

PHP Finite State Machine
http://pear.php.net/package/fsm
MIT License
34 stars 13 forks source link

Use __construct() constructor #8

Open GDmac opened 9 years ago

GDmac commented 9 years ago

I namespaced fsm.php into my own application library, and bumped into a constructor issue. new lib\FSM('START', $this->payload); doesn't actually set initialstate and currentstate, because the FSM() method is not seen as a constructor.

Maybe it is time to start php 5.0 compatibility and use __construct() :-)

jparise commented 9 years ago

I'd accept a pull request that moves this package to PHP 5+.

GDmac commented 9 years ago

We should probably move to PSR4. This means rewriting examples, tests and documentation as well.