-
-
Save cjsaylor/efc61cb87783055d3c9e to your computer and use it in GitHub Desktop.
application_event_for_plugin_blog_1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function register($events, $callback) { | |
if (!is_callable($callback)) { | |
throw new \Exception('Registration callback is not callable.'); | |
} | |
$events = (array)$events; | |
foreach ($events as $event) { | |
static::$registry[$event][] = $callback; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment