function Message::initWithDescriptor
@ignore
1 call to Message::initWithDescriptor()
- Message::__construct in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ Message.php - @ignore
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ Message.php, line 148
Class
- Message
- Parent class of all proto messages. Users should not instantiate this class or extend this class or its child classes by their own. See the comment of specific functions for more details.
Namespace
Google\Protobuf\InternalCode
private function initWithDescriptor(Descriptor $desc) {
$this->desc = $desc;
foreach ($desc->getField() as $field) {
$setter = $field->getSetter();
$defaultValue = $this->defaultValue($field);
$this->{$setter}($defaultValue);
}
}