Skip to content

Commit

Permalink
Allow Directory Structure in Module Namespaces (#5236)
Browse files Browse the repository at this point in the history
This allows nested hierarchical directory structures to be used in LORIS module namespaces with support for autoloading the classes.
  • Loading branch information
maltheism authored and driusan committed Sep 23, 2019
1 parent 0dacece commit af4babf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions php/libraries/Module.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class Module extends \LORIS\Router\PrefixRouter implements RequestHandlerInterfa
$fpath = $mpath . "/php/"
. strtolower(substr($class, strlen("LORIS\\$name\\")))
. ".class.inc";
$fpath = str_replace('\\', '/', $fpath);
if (!file_exists($fpath)) {
throw new \NotFound(
"Could not load module `$name`: file `$fpath` " .
Expand Down

0 comments on commit af4babf

Please sign in to comment.