Skip to content

Commit

Permalink
Update calls to \Module::factory
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Nov 16, 2022
1 parent 84f5f6b commit 4ea4e2d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/issue_tracker/php/issuerowprovisioner.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class IssueRowProvisioner extends \LORIS\Data\Provisioners\DBRowProvisioner
$module = new \NullModule($this->lorisinstance);
if (!empty($mname)) {
if (!isset($modules[$mname])) {
$modules[$mname] = \Module::factory($this->lorisinstance, $mname);
$modules[$mname] = $this->lorisinstance->getModule($mname);
}
$module = &$modules[$mname];
}
Expand Down
2 changes: 1 addition & 1 deletion modules/module_manager/php/modulerow.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ModuleRow implements \LORIS\Data\DataInstance
public function __construct(\LORIS\LorisInstance $loris, array $row)
{
$this->lorisinstance = $loris;
$this->Module = \Module::factory($loris, $row['name']);
$this->Module = $loris->getModule($row['name']);
$this->Active = $row['active'];
}

Expand Down
4 changes: 2 additions & 2 deletions php/libraries/NDB_BVL_Instrument.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ abstract class NDB_BVL_Instrument extends NDB_Page
// since it isn't a real module, but it's required for the page
// constructor.
$loris,
Module::factory($loris, "instruments"),
$loris->getModule("instruments"),
$page,
$commentID,
$commentID,
Expand All @@ -272,7 +272,7 @@ abstract class NDB_BVL_Instrument extends NDB_Page
// Now go ahead and instantiate it
$obj = new $class(
$loris,
Module::factory($loris, "instruments"),
$loris->getModule("instruments"),
$page,
$commentID,
$commentID,
Expand Down
4 changes: 2 additions & 2 deletions src/Router/BaseRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface

$factory->setBaseURL($baseurl);

$module = \Module::factory($this->lorisinstance, $modulename);
$module = $this->lorisinstance->getModule($modulename);
$mr = new ModuleRouter($module);
$request = $request->withURI($suburi);
return $ehandler->process($request, $mr);
Expand All @@ -136,7 +136,7 @@ public function handle(ServerRequestInterface $request) : ResponseInterface
$request = $request
->withAttribute("baseurl", $baseurl->__toString())
->withAttribute("CandID", $components[0]);
$module = \Module::factory($this->lorisinstance, "timepoint_list");
$module = $this->lorisinstance->getModule("timepoint_list");
$mr = new ModuleRouter($module);
return $ehandler->process($request, $mr);
}
Expand Down

0 comments on commit 4ea4e2d

Please # to comment.