public static addNamespace ( string $name ) | ||
$name | string | The namespace name |
public static function addNamespace($name)
{
if (in_array($name, self::$namespaces)) {
return;
}
array_unshift(self::$namespaces, $name);
}
<?php /** * Copyright (C) 2015 Christian Barkowsky * * @package news4ward_robots * @author Christian Barkowsky <*****@*****.**> * @copyright Christian Barkowsky <http://christianbarkowsky.de> * @license LGPL */ \Contao\ClassLoader::addNamespace('CBW'); /** * Register the classes */ ClassLoader::addClasses(array('CBW\\CBWNews4wardRobots' => 'system/modules/news4ward_robots/modules/CBWNews4wardRobots.php'));