Skip to content

Instantly share code, notes, and snippets.

@Schlaefer
Last active April 12, 2016 11:24
Show Gist options
  • Save Schlaefer/2c16687c741b3dd36f2014c4ff88aad5 to your computer and use it in GitHub Desktop.
Save Schlaefer/2c16687c741b3dd36f2014c4ff88aad5 to your computer and use it in GitHub Desktop.
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