class EnumBuilderContext
Hierarchy
- class \Google\Protobuf\Internal\EnumBuilderContext
Expanded class hierarchy of EnumBuilderContext
1 file declares its use of EnumBuilderContext
- DescriptorPool.php in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ DescriptorPool.php
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ EnumBuilderContext.php, line 15
Namespace
Google\Protobuf\InternalView source
class EnumBuilderContext {
private $descriptor;
private $pool;
public function __construct($full_name, $klass, $pool) {
$this->descriptor = new EnumDescriptor();
$this->descriptor
->setFullName($full_name);
$this->descriptor
->setClass($klass);
$this->pool = $pool;
}
public function value($name, $number) {
$value = new EnumValueDescriptor($name, $number);
$this->descriptor
->addValue($number, $value);
return $this;
}
public function finalizeToPool() {
$this->pool
->addEnumDescriptor($this->descriptor);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
EnumBuilderContext::$descriptor | private | property | |
EnumBuilderContext::$pool | private | property | |
EnumBuilderContext::finalizeToPool | public | function | |
EnumBuilderContext::value | public | function | |
EnumBuilderContext::__construct | public | function |