Skip to content

Instantly share code, notes, and snippets.

@anandkunal
Created December 20, 2010 04:56
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 anandkunal/748035 to your computer and use it in GitHub Desktop.
Save anandkunal/748035 to your computer and use it in GitHub Desktop.
<?php
ToroHook::add('before_request', function() { echo 'Before Request'; });
ToroHook::add('after_request', function() { echo 'After Request'; });
class SomeHandler extends ToroHandler {
public function __construct() {
ToroHook::add('before_handler', function() { echo 'Before Handler'; });
ToroHook::add('after_handler', function() { echo 'After Handler'; });
}
public function get() {
echo 'I am the handler.';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment