public static function map($scheme = null, $class = null)
    {
        if (is_array($scheme)) {
            foreach ($scheme as $s => $class) {
                static::map($s, $class);
            }
            return static::$schemeMap;
        }

        if ($scheme === null) {
            return static::$schemeMap;
        }

        if ($class === null) {
            return isset(static::$schemeMap[$scheme]) ? static::$schemeMap[$scheme] : null;
        }

        if ($class === false) {
            unset($schemeMap[$scheme]);
            return;
        }

        return static::$schemeMap[$scheme] = $class;
    }
public static function map($scheme = null, $class = null)
    {
        if (is_array($scheme)) {
            foreach ($scheme as $s => $class) {
                static::map($s, $class);
            }
            return static::$schemeMap;
        }

        if ($scheme === null) {
            return static::$schemeMap;
        }

        if ($class === null) {
            return isset(static::$schemeMap[$scheme]) ? static::$schemeMap[$scheme] : null;
        }

        if ($class === false) {
            unset($schemeMap[$scheme]);
            return;
        }

        return static::$schemeMap[$scheme] = $class;
    }
public static function map ( $ scheme = null , $ class = null ) { if ( is_array ( $ scheme ) ) { foreach ( $ scheme as $ s => $ class ) { static :: map ( $ s , $ class ) ; } return static :: $ schemeMap ; } if ( $ scheme === null ) { return static :: $ schemeMap ; } if ( $ class === null ) { return isset ( static :: $ schemeMap [ $ scheme ] ) ? static :: $ schemeMap [ $ scheme ] : null ; } if ( $ class === false ) { unset ( $ schemeMap [ $ scheme ] ) ; return ; } return static :: $ schemeMap [ $ scheme ] = $ class ; }
Read or change the scheme map

For example:

$true = Dsn::map('foo', '\My\Dsn\Class');
$classname = Dsn::map('foo');

$true = Dsn::map('foo', false); // Remove foo from the map

$fullMap = Dsn::map();
$false = Dsn::map('unknown');

$array = ['this' => 'That\Class', 'other' => 'Other\Class', ...];
$fullMap = Dsn::map($array);

@param mixed $scheme
@param string $class
@return mixed
Read or change the scheme map