2020-01-15 02:50:23 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once 'website.php';
|
|
|
|
|
|
|
|
class Modules
|
|
|
|
{
|
|
|
|
/** @var Database|null */ private $database = null;
|
|
|
|
/** @var AdventOfCode|null */ private $adventOfCode = null;
|
|
|
|
/** @var Blog|null */ private $blog = null;
|
|
|
|
/** @var Books|null */ private $books = null;
|
|
|
|
/** @var Euler|null */ private $euler = null;
|
|
|
|
/** @var Programs|null */ private $programs = null;
|
|
|
|
/** @var AlephNoteStatistics|null */ private $anstats = null;
|
|
|
|
/** @var UpdatesLog|null */ private $updateslog = null;
|
|
|
|
/** @var WebApps|null */ private $webapps = null;
|
|
|
|
/** @var MikescherGitGraph|null */ private $extendedgitgraph = null;
|
2020-01-17 00:55:41 +01:00
|
|
|
/** @var Highscores|null */ private $highscores = null;
|
2020-01-19 01:22:06 +01:00
|
|
|
/** @var SelfTest|null */ private $selftest = null;
|
2020-01-15 02:50:23 +01:00
|
|
|
|
|
|
|
/** @var Website */
|
|
|
|
private $site;
|
|
|
|
|
|
|
|
public function __construct(Website $site)
|
|
|
|
{
|
|
|
|
$this->site = $site;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function Database()
|
|
|
|
{
|
|
|
|
if ($this->database === null) { require_once 'modules/database.php'; $this->database = new Database($this->site); }
|
|
|
|
return $this->database;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function AdventOfCode(): AdventOfCode
|
|
|
|
{
|
|
|
|
if ($this->adventOfCode === null) { require_once 'modules/adventofcode.php'; $this->adventOfCode = new AdventOfCode(); }
|
|
|
|
return $this->adventOfCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function Blog(): Blog
|
|
|
|
{
|
|
|
|
if ($this->blog === null) { require_once 'modules/blog.php'; $this->blog = new Blog(); }
|
|
|
|
return $this->blog;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function Books(): Books
|
|
|
|
{
|
2020-01-17 01:28:34 +01:00
|
|
|
if ($this->books === null) { require_once 'modules/books.php'; $this->books = new Books($this->site); }
|
2020-01-15 02:50:23 +01:00
|
|
|
return $this->books;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function Euler(): Euler
|
|
|
|
{
|
|
|
|
if ($this->euler === null) { require_once 'modules/euler.php'; $this->euler = new Euler(); }
|
|
|
|
return $this->euler;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function Programs(): Programs
|
|
|
|
{
|
|
|
|
if ($this->programs === null) { require_once 'modules/programs.php'; $this->programs = new Programs(); }
|
|
|
|
return $this->programs;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function AlephNoteStatistics(): AlephNoteStatistics
|
|
|
|
{
|
|
|
|
if ($this->anstats === null) { require_once 'modules/alephnoteStatistics.php'; $this->anstats = new AlephNoteStatistics($this->site); }
|
|
|
|
return $this->anstats;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function UpdatesLog(): UpdatesLog
|
|
|
|
{
|
|
|
|
if ($this->updateslog === null) { require_once 'modules/updateslog.php'; $this->updateslog = new UpdatesLog($this->site); }
|
|
|
|
return $this->updateslog;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function WebApps(): WebApps
|
|
|
|
{
|
|
|
|
if ($this->webapps === null) { require_once 'modules/webapps.php'; $this->webapps = new WebApps(); }
|
|
|
|
return $this->webapps;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function ExtendedGitGraph(): MikescherGitGraph
|
|
|
|
{
|
|
|
|
if ($this->extendedgitgraph === null) { require_once 'modules/mikeschergitgraph.php'; $this->extendedgitgraph = new MikescherGitGraph($this->site); }
|
|
|
|
return $this->extendedgitgraph;
|
|
|
|
}
|
|
|
|
|
2020-01-17 00:55:41 +01:00
|
|
|
public function Highscores(): Highscores
|
|
|
|
{
|
|
|
|
if ($this->highscores === null) { require_once 'modules/highscores.php'; $this->highscores = new Highscores($this->site); }
|
|
|
|
return $this->highscores;
|
|
|
|
}
|
2020-01-19 01:22:06 +01:00
|
|
|
|
|
|
|
public function SelfTest(): SelfTest
|
|
|
|
{
|
|
|
|
if ($this->selftest === null) { require_once 'modules/selftest.php'; $this->selftest = new SelfTest(); }
|
|
|
|
return $this->selftest;
|
|
|
|
}
|
2020-01-15 02:50:23 +01:00
|
|
|
}
|