Jamm\Autoload\Autoloader::register_namespace_dir PHP Method

register_namespace_dir() public method

Associate namespace with directory For example, if namespace '\name\space' will be associated with directory '/home/name/space', class '\name\space\subnamespace\Class_Name.php' will be looked in /home/name/space/subnamespace/Class_Name.php
public register_namespace_dir ( string $namespace, string $dir )
$namespace string name\space\ (last symbol - slash, and no slashes in start)
$dir string
    public function register_namespace_dir($namespace, $dir)
    {
        if (($dir = realpath($dir)) === false) {
            trigger_error('Namespace was not registered! Directory not found', E_USER_WARNING);
            return false;
        }
        if (!empty($namespace)) {
            $namespace = trim($namespace, '\\') . '\\';
        }
        $this->namespaces_dirs[$namespace] = $dir . DIRECTORY_SEPARATOR;
    }