Last active
April 12, 2016 11:24
-
-
Save Schlaefer/2c16687c741b3dd36f2014c4ff88aad5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Plugin extends \Phile\Plugin\AbstractPlugin | |
{ | |
protected $events = ['request_uri' => 'startup']; | |
public function startup($data) | |
{ | |
if ($data['uri'] === 'foo') { | |
// matches URL | |
$this->doStuffOnFoo(); | |
exit(); | |
} | |
} | |
protected function doStuffOnFoo() | |
{ | |
echo 'Do foo'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment