summaryrefslogtreecommitdiffstats
path: root/php-hoa-consistency-autoload.php
blob: 379b6d5f180b58b3f640d7f9554a375655602cbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/* Autoloader for hoa/consistency and its dependencies */

/* This will load the autoloader */
require_once __DIR__ . '/Prelude.php';

$vendor = '/usr/share/php';

// Use Hoa autoloader
if (!isset($fedoraHoaLoader) || !($fedoraHoaLoader instanceof \Hoa\Consistency\Autoloader)) {
	$fedoraHoaLoader = new \Hoa\Consistency\Autoloader();
	$fedoraHoaLoader->register();
	$fedoraHoaLoader->addNamespace('Hoa\\Consistency\\', __DIR__);
}

// Dependencies
foreach ([
	$vendor . '/Hoa/Exception/autoload.php'      => true,
	] as $dep => $mandatory) {
	if ($mandatory || file_exists($dep)) require_once($dep);
}