Skip to content

Commit

Permalink
feat: refactor to use pw classloader
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Mar 4, 2023
1 parent 108613f commit 091888e
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,14 @@ public function __construct()

public function init()
{
$this->wire->classLoader->addNamespace("RockFrontend", __DIR__ . "/classes");

$this->path = $this->wire->config->paths($this);
$this->home = $this->wire->pages->get(1);

if (!is_array($this->features)) $this->features = [];
if (!is_array($this->migrations)) $this->migrations = [];

require_once($this->path . "Asset.php");
require_once($this->path . "AssetComment.php");
require_once($this->path . "AssetsArray.php");
require_once($this->path . "StylesArray.php");
require_once($this->path . "ScriptsArray.php");

// make $rockfrontend and $home variable available in template files
$this->wire('rockfrontend', $this);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 091888e

Please sign in to comment.