private function normalizeClassname($classpath)
    {
        if (NAMESPACE_SEPARATOR == substr($classpath, 0, 1)) {
            $classpath = substr($classpath, 1);
        }

        if (false !== ($pos = strrpos($classpath, NAMESPACE_SEPARATOR))) {
            $namespace = substr($classpath, 0, $pos);
            $classname = substr($classpath, $pos + 1);
        } else {
            $namespace = '';
            $classname = $classpath;
        }

        if (false === preg_match("/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/", $namespace)) {
            throw new Exception\InvalidNamespaceException(sprintf('Invalid namespace provided: %s.', $namespace));
        }

        if (false === preg_match("/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/", $classname)) {
            throw new Exception\InvalidClassnameException(sprintf('Invalid class name provided: %s.', $classname));
        }

        return array($namespace, $classname);
    }
private function normalizeClassname($classpath)
    {
        if (NAMESPACE_SEPARATOR == substr($classpath, 0, 1)) {
            $classpath = substr($classpath, 1);
        }

        if (false !== ($pos = strrpos($classpath, NAMESPACE_SEPARATOR))) {
            $namespace = substr($classpath, 0, $pos);
            $classname = substr($classpath, $pos + 1);
        } else {
            $namespace = '';
            $classname = $classpath;
        }

        if (false === preg_match("/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/", $namespace)) {
            throw new Exception\InvalidNamespaceException(sprintf('Invalid namespace provided: %s.', $namespace));
        }

        if (false === preg_match("/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/", $classname)) {
            throw new Exception\InvalidClassnameException(sprintf('Invalid class name provided: %s.', $classname));
        }

        return array($namespace, $classname);
    }
private function normalizeClassname ( $ classpath ) { if ( NAMESPACE_SEPARATOR == substr ( $ classpath , 0 , 1 ) ) { $ classpath = substr ( $ classpath , 1 ) ; } if ( false !== ( $ pos = strrpos ( $ classpath , NAMESPACE_SEPARATOR ) ) ) { $ namespace = substr ( $ classpath , 0 , $ pos ) ; $ classname = substr ( $ classpath , $ pos + 1 ) ; } else { $ namespace = '' ; $ classname = $ classpath ; } if ( false === preg_match ( "/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/" , $ namespace ) ) { throw new Exception \ InvalidNamespaceException ( sprintf ( 'Invalid namespace provided: %s.' , $ namespace ) ) ; } if ( false === preg_match ( "/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/" , $ classname ) ) { throw new Exception \ InvalidClassnameException ( sprintf ( 'Invalid class name provided: %s.' , $ classname ) ) ; } return array ( $ namespace , $ classname ) ; }
Returns the namespace and the class name to be found.

@param string $classpath the absolute class name

@return array array($namespace, $classname)

@throws \BackBee\AutoLoader\Exception\InvalidNamespaceException Occurs when the namespace is not valid
@throws \BackBee\AutoLoader\Exception\InvalidClassnameException Occurs when the class name is not valid
Returns the namespace and the class name to be found .