Skip to content

Instantly share code, notes, and snippets.

@NoelDavies
Created January 23, 2013 13:42
Show Gist options
  • Save NoelDavies/4605714 to your computer and use it in GitHub Desktop.
Save NoelDavies/4605714 to your computer and use it in GitHub Desktop.
<?php
$route = array(
'label' => 'MyModule_viewThread',
'status' => '1', // 1 for enabled, 0 for disabled
'pattern' => '/path/to/something/:name', // URL for the front end
'arguments' => array(
'module' => 'myModuleName', // module name to use when invoking
'method' => 'myMethod' // Method name to invoke within the above module
// Feel free to add other arguments in here, these will be passed to your method where the var name is the array key
),
'requirements' => array(
'name' => 'd+'
),
'method' => 'GET'
);
$objRoute->addRoute( $route, md5('myModule'));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment