Skip to content

Instantly share code, notes, and snippets.

@cjsaylor
Created August 4, 2012 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjsaylor/efc61cb87783055d3c9e to your computer and use it in GitHub Desktop.
Save cjsaylor/efc61cb87783055d3c9e to your computer and use it in GitHub Desktop.
application_event_for_plugin_blog_1
<?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