public function isValidNodename($nodeName)
    {
        try {
            $parts = explode(':', $nodeName);
            if (1 > count($parts) || 2 < count($parts)) {
                return new RepositoryException("Name contains illegal characters: $nodeName");
            }
            if (0 === strlen($parts[0])) {
                return new RepositoryException("Name may not be empty: $nodeName");
            }
            PathHelper::assertValidLocalName($parts[0]);
            if (2 == count($parts)) {
                // [0] was the namespace prefix, also check the name
                PathHelper::assertValidLocalName($parts[1]);
                if (0 === strlen($parts[1])) {
                    return new RepositoryException("Local name may not be empty: $nodeName");
                }
            }
        } catch (RepositoryException $e) {
            return $e;
        }
    }
public function isValidNodename($nodeName)
    {
        try {
            $parts = explode(':', $nodeName);
            if (1 > count($parts) || 2 < count($parts)) {
                return new RepositoryException("Name contains illegal characters: $nodeName");
            }
            if (0 === strlen($parts[0])) {
                return new RepositoryException("Name may not be empty: $nodeName");
            }
            PathHelper::assertValidLocalName($parts[0]);
            if (2 == count($parts)) {
                // [0] was the namespace prefix, also check the name
                PathHelper::assertValidLocalName($parts[1]);
                if (0 === strlen($parts[1])) {
                    return new RepositoryException("Local name may not be empty: $nodeName");
                }
            }
        } catch (RepositoryException $e) {
            return $e;
        }
    }
public function isValidNodename ( $ nodeName ) { try { $ parts = explode ( ':' , $ nodeName ) ; if ( 1 > count ( $ parts ) || 2 < count ( $ parts ) ) { return new RepositoryException ( "Name contains illegal characters: $nodeName" ) ; } if ( 0 === strlen ( $ parts [ 0 ] ) ) { return new RepositoryException ( "Name may not be empty: $nodeName" ) ; } PathHelper :: assertValidLocalName ( $ parts [ 0 ] ) ; if ( 2 == count ( $ parts ) ) { // [0] was the namespace prefix, also check the name PathHelper :: assertValidLocalName ( $ parts [ 1 ] ) ; if ( 0 === strlen ( $ parts [ 1 ] ) ) { return new RepositoryException ( "Local name may not be empty: $nodeName" ) ; } } } catch ( RepositoryException $ e ) { return $ e ; } }
Check if this node name is valid. Returns null if valid, an exception otherwise.

@param string $nodeName The node local name

@return RepositoryException|null
Check if this node name is valid . Returns null if valid an exception otherwise .