1.3 KiB
1.3 KiB
Changelog and Upgrade Instructions
0.2.x to 0.3.x
Major changes:
- The
Shell::EV_*constants have been renamed toShell::EVT_*. - The
configuremethod has been removed. If you really need to extend theShellclass, use the constructor to configure your shell (see examples/timers.php) - Events are now dispatched using the NoccyLabs/TinyEvent library. The main difference here is in how the event object received. The shell instance is now passed in the object, and you can provide any userdata to be passed on to the handler when you add the listener.
- The event
Shell::EVT_BAD_COMMANDwill be fired if a command can not be found, assumingContext->execute()does not accept the command. (see examples/commandevents.php) - When calling
Context->addCommand()you can now use bothhelpanddescras the last argument to provide the description text for the command. This change is intended to makeaddCommandand the doccomment@descrmore similar.
New features:
- Tasks can now be added and removed from the shell. Tasks will receive
a call to their
update()method once per main loop, until they are removed or return false from theisValid()method. Tasks need to implement theTaskInterfaceinterface. (see examples/tasks.php)