From 5a9c02f7bf6466c02458311eb16545c17ebc945e Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Mon, 29 Feb 2016 19:51:06 +0100 Subject: [PATCH] Allow plugins to trigger events You MUST NOT trigger events of Pico's core through a plugin! --- lib/Pico.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Pico.php b/lib/Pico.php index b49c7c5..a0cb75f 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -1382,6 +1382,7 @@ class Pico * * Deprecated events (as used by plugins not implementing * {@link PicoPluginInterface}) are triggered by {@link PicoDeprecated}. + * You MUST NOT trigger events of Pico's core through a plugin! * * @see PicoPluginInterface * @see AbstractPicoPlugin @@ -1390,7 +1391,7 @@ class Pico * @param array $params optional parameters to pass * @return void */ - protected function triggerEvent($eventName, array $params = array()) + public function triggerEvent($eventName, array $params = array()) { if (!empty($this->plugins)) { foreach ($this->plugins as $plugin) {