From 8dcb2b47628346226b18940b5cde7849f7a24687 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 23 Dec 2012 23:05:51 +0400 Subject: implement plugin routing masks, add example plugin --- plugins/example_routing/example_routing.php | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 plugins/example_routing/example_routing.php (limited to 'plugins') diff --git a/plugins/example_routing/example_routing.php b/plugins/example_routing/example_routing.php new file mode 100644 index 000000000..a5c4e6139 --- /dev/null +++ b/plugins/example_routing/example_routing.php @@ -0,0 +1,46 @@ +link = $host->get_link(); + $this->host = $host; + + $host->add_handler("test", "example", $this); + $host->add_handler("public", "getunread", $this); + } + + function getunread() { + print rand(0,100); # yeah right + } + + function example() { + print "example method called"; + } + + function csrf_ignore($method) { + return true; + } + + function before($method) { + return true; + } + + function after() { + return true; + } + +} +?> -- cgit v1.2.3