aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/src/Google/Protobuf/Any.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/src/Google/Protobuf/Any.php')
-rw-r--r--php/src/Google/Protobuf/Any.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/php/src/Google/Protobuf/Any.php b/php/src/Google/Protobuf/Any.php
index a39c4e6a..91ba4bd5 100644
--- a/php/src/Google/Protobuf/Any.php
+++ b/php/src/Google/Protobuf/Any.php
@@ -207,9 +207,9 @@ class Any extends \Google\Protobuf\Internal\Message
public function unpack()
{
// Get fully qualifed name from type url.
- $url_prifix_len = strlen(Any::TYPE_URL_PREFIX);
+ $url_prifix_len = strlen(GPBUtil::TYPE_URL_PREFIX);
if (substr($this->type_url, 0, $url_prifix_len) !=
- Any::TYPE_URL_PREFIX) {
+ GPBUtil::TYPE_URL_PREFIX) {
throw new \Exception(
"Type url needs to be type.googleapis.com/fully-qulified");
}
@@ -251,7 +251,7 @@ class Any extends \Google\Protobuf\Internal\Message
$pool = DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByClassName(get_class($msg));
$fully_qualifed_name = $desc->getFullName();
- $this->type_url = Any::TYPE_URL_PREFIX.substr(
+ $this->type_url = GPBUtil::TYPE_URL_PREFIX.substr(
$fully_qualifed_name, 1, strlen($fully_qualifed_name));
}
@@ -265,7 +265,7 @@ class Any extends \Google\Protobuf\Internal\Message
$pool = DescriptorPool::getGeneratedPool();
$desc = $pool->getDescriptorByClassName($klass);
$fully_qualifed_name = $desc->getFullName();
- $type_url = Any::TYPE_URL_PREFIX.substr(
+ $type_url = GPBUtil::TYPE_URL_PREFIX.substr(
$fully_qualifed_name, 1, strlen($fully_qualifed_name));
return $this->type_url === $type_url;
}