PluginProbe
Media Cloud Sync / 1.2.2
Media Cloud Sync v1.2.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
media-cloud-sync / includes / sdk / google / google / protobuf / src / Google / Protobuf / Syntax.php

Syntax.php in Media Cloud Sync 1.2.2, at includes/sdk/google/google/protobuf/src/Google/Protobuf/Syntax.php

44 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 # Generated by the protocol buffer compiler. DO NOT EDIT!
4 # source: google/protobuf/type.proto
5 namespace Dudlewebs\WPMCS\Google\Protobuf;
6
7 use UnexpectedValueException;
8 /**
9 * The syntax in which a protocol buffer element is defined.
10 *
11 * Protobuf type <code>google.protobuf.Syntax</code>
12 */
13 class Syntax
14 {
15 /**
16 * Syntax `proto2`.
17 *
18 * Generated from protobuf enum <code>SYNTAX_PROTO2 = 0;</code>
19 */
20 const SYNTAX_PROTO2 = 0;
21 /**
22 * Syntax `proto3`.
23 *
24 * Generated from protobuf enum <code>SYNTAX_PROTO3 = 1;</code>
25 */
26 const SYNTAX_PROTO3 = 1;
27 private static $valueToName = [self::SYNTAX_PROTO2 => 'SYNTAX_PROTO2', self::SYNTAX_PROTO3 => 'SYNTAX_PROTO3'];
28 public static function name($value)
29 {
30 if (!isset(self::$valueToName[$value])) {
31 throw new UnexpectedValueException(sprintf('Enum %s has no name defined for value %s', __CLASS__, $value));
32 }
33 return self::$valueToName[$value];
34 }
35 public static function value($name)
36 {
37 $const = __CLASS__ . '::' . strtoupper($name);
38 if (!defined($const)) {
39 throw new UnexpectedValueException(sprintf('Enum %s has no value defined for name %s', __CLASS__, $name));
40 }
41 return constant($const);
42 }
43 }
44