Firestore/src/PathTrait.php
private function databaseIdFromName($name)
    {
        try {
            $parsed = FirestoreGapicClient::parseName($name);
        } catch (ValidationException $e) {
            return null;
        }

        return isset($parsed['database'])
            ? $parsed['database']
            : null;
    }
private function databaseIdFromName($name)
    {
        try {
            $parsed = FirestoreGapicClient::parseName($name);
        } catch (ValidationException $e) {
            return null;
        }

        return isset($parsed['database'])
            ? $parsed['database']
            : null;
    }
private function databaseIdFromName ( $ name ) { try { $ parsed = FirestoreGapicClient :: parseName ( $ name ) ; } catch ( ValidationException $ e ) { return null ; } return isset ( $ parsed [ 'database' ] ) ? $ parsed [ 'database' ] : null ; }
Return the database ID from a fully-qualified path name.

This method returns a bare database ID. For the fully-qualified database
name, use {@see Google\Cloud\Firestore\PathTrait::databaseFromName()}.

@param string $name
@return string|null
Return the database ID from a fully - qualified path name .