diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-11-17 12:54:07 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-11-17 12:54:07 +0000 |
commit | c61f343b278e83d2c0d32287935466582dbc6cfa (patch) | |
tree | 9b80f5666e272ee899416060cf70412e0e9e7794 /engine/lib/pagehandler.php | |
parent | 21bcc0fda104c1eb11c7386434b50a158229bc77 (diff) | |
download | elgg-c61f343b278e83d2c0d32287935466582dbc6cfa.tar.gz elgg-c61f343b278e83d2c0d32287935466582dbc6cfa.tar.bz2 |
updated some documentation on register_page_handler(). This fixes #1373
git-svn-id: http://code.elgg.org/elgg/trunk@3693 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/pagehandler.php')
-rw-r--r-- | engine/lib/pagehandler.php | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php index 528be81de..79ac70c70 100644 --- a/engine/lib/pagehandler.php +++ b/engine/lib/pagehandler.php @@ -57,14 +57,20 @@ function page_handler($handler, $page) { /** * Registers a page handler for a particular identifier * - * eg, you can register a function called 'blog_page_handler' for handler type 'blog' - * - * Now for all URLs of type http://yoururl/blog/*, the blog_page_handler function will be called. + * For example, you can register a function called 'blog_page_handler' for handler type 'blog' + * Now for all URLs of type http://yoururl/pg/blog/*, the blog_page_handler() function will be called. * The part of the URL marked with * above will be exploded on '/' characters and passed as an - * array to that function, eg: - * - * For the URL http://yoururl/blog/username/friends/: - * blog_page_handler('blog', array('username','friends')); + * array to that function. + * For example, the URL http://yoururl/blog/username/friends/ would result in the call: + * blog_page_handler(array('username','friends'), blog); + * + * Page handler functions should return true or the default page handler will be called. + * + * A request to register a page handler with the same identifier as previously registered + * handler will replace the previous one. + * + * The context is set to the page handler identifier before the registered + * page handler function is called. For the above example, the context is set to 'blog'. * * @param string $handler The page type to handle * @param string $function Your function name |