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
configure
method has been removed. If you really need to extend theShell
class, 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_COMMAND
will 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 bothhelp
anddescr
as the last argument to provide the description text for the command. This change is intended to makeaddCommand
and the doccomment@descr
more 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 theTaskInterface
interface. (see examples/tasks.php)