Updated examples, added onEnter method to contexts
This commit is contained in:
@ -66,6 +66,11 @@ class Context
|
||||
$this->findCommands();
|
||||
}
|
||||
|
||||
public function onEnter()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
protected function findCommands()
|
||||
{
|
||||
$refl = new \ReflectionClass(get_called_class());
|
||||
|
@ -113,6 +113,7 @@ class Shell
|
||||
}
|
||||
$context->setShell($this);
|
||||
$this->context = $context;
|
||||
$context->onEnter();
|
||||
$this->dispatchEvent(self::EVT_CONTEXT_CHANGED);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user