public function parseClassName($className)
    {
        if (!preg_match('/^\\\\?(.*?)\\\\?([a-zA-Z0-9_]+)$/', $className, $matches)) {
            throw new \Exception('Invalid class name "' . $className . '" given');
        }

        return array(
            'namespace' => $matches[1],
            'classname' => $matches[2],
            'fqcn'      => $className
        );
    }
public function parseClassName($className)
    {
        if (!preg_match('/^\\\\?(.*?)\\\\?([a-zA-Z0-9_]+)$/', $className, $matches)) {
            throw new \Exception('Invalid class name "' . $className . '" given');
        }

        return array(
            'namespace' => $matches[1],
            'classname' => $matches[2],
            'fqcn'      => $className
        );
    }
public function parseClassName ( $ className ) { if ( ! preg_match ( '/^\\\\?(.*?)\\\\?([a-zA-Z0-9_]+)$/' , $ className , $ matches ) ) { throw new \ Exception ( 'Invalid class name "' . $ className . '" given' ) ; } return array ( 'namespace' => $ matches [ 1 ] , 'classname' => $ matches [ 2 ] , 'fqcn' => $ className ) ; }
Split long class name to namespace and class name

@param string $className

@throws \Exception

@return array An array includes keys below [namespace, classname, fqcn]
Split long class name to namespace and class name