PubSub/src/ResourceNameTrait.php
private function isFullyQualifiedName($type, $name)
    {
        if (!isset($this->regexes[$type])) {
            throw new InvalidArgumentException(sprintf(
                'Regex `%s` is not defined',
                $type
            ));
        }
        return (preg_match($this->regexes[$type], $name) === 1);
    }
private function isFullyQualifiedName($type, $name)
    {
        if (!isset($this->regexes[$type])) {
            throw new InvalidArgumentException(sprintf(
                'Regex `%s` is not defined',
                $type
            ));
        }
        return (preg_match($this->regexes[$type], $name) === 1);
    }
private function isFullyQualifiedName ( $ type , $ name ) { if ( ! isset ( $ this -> regexes [ $ type ] ) ) { throw new InvalidArgumentException ( sprintf ( 'Regex `%s` is not defined' , $ type ) ) ; } return ( preg_match ( $ this -> regexes [ $ type ] , $ name ) === 1 ) ; }
Check if a name of a give type is a fully-qualified resource name.

Example:
```
$topic = $pubsub->topic('my-topic-name');
if ($topic->isFullyQualifiedName('project', 'projects/my-awesome-project/topics/my-topic-name')) {
// do stuff
}
```

@param  string $type
@param  string $name
@return bool
@throws \InvalidArgumentException
Check if a name of a give type is a fully - qualified resource name .