src/Utilities.php
public static function getNamespace($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        if (strpos($className, '\\') === false) {
            return '';
        }
        return preg_replace('/\\\\[^\\\\]+$/', '', $className);
    }
public static function getNamespace($className)
    {
        if (is_object($className)) {
            $className = get_class($className);
        }
        if (strpos($className, '\\') === false) {
            return '';
        }
        return preg_replace('/\\\\[^\\\\]+$/', '', $className);
    }
public static function getNamespace ( $ className ) { if ( is_object ( $ className ) ) { $ className = get_class ( $ className ) ; } if ( strpos ( $ className , '\\' ) === false ) { return '' ; } return preg_replace ( '/\\\\[^\\\\]+$/' , '' , $ className ) ; }
Get namespace part of a class name.

@param string|object $className
Class or object, e.g. 'Jivoo\Utilities'.
@return string Namespace, e.g. 'Jivoo'.
Get namespace part of a class name .