Google\Cloud\PubSub\ResourceNameTrait::isFullyQualifiedName PHP Method

isFullyQualifiedName() public method

Example: $topic = $pubsub->topic('my-topic-name'); if ($topic->isFullyQualifiedName('project', 'projects/my-awesome-project/topics/my-topic-name')) { do stuff }
public isFullyQualifiedName ( string $type, string $name ) : boolean
$type string
$name string
return boolean
    public 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;
    }