rv.analytics.trackedevents.EditorObjectAdded.FromInsertionSource */ class FromInsertionSource { /** * Generated from protobuf enum EDITOR_TOOLBAR = 0; */ const EDITOR_TOOLBAR = 0; /** * Generated from protobuf enum EDITOR_MAIN_MENU = 1; */ const EDITOR_MAIN_MENU = 1; /** * Generated from protobuf enum EDITOR_HOTKEY = 2; */ const EDITOR_HOTKEY = 2; /** * Generated from protobuf enum EDITOR_COPY_PASTE = 3; */ const EDITOR_COPY_PASTE = 3; private static $valueToName = [ self::EDITOR_TOOLBAR => 'EDITOR_TOOLBAR', self::EDITOR_MAIN_MENU => 'EDITOR_MAIN_MENU', self::EDITOR_HOTKEY => 'EDITOR_HOTKEY', self::EDITOR_COPY_PASTE => 'EDITOR_COPY_PASTE', ]; public static function name($value) { if (!isset(self::$valueToName[$value])) { throw new UnexpectedValueException(sprintf( 'Enum %s has no name defined for value %s', __CLASS__, $value)); } return self::$valueToName[$value]; } public static function value($name) { $const = __CLASS__ . '::' . strtoupper($name); if (!defined($const)) { throw new UnexpectedValueException(sprintf( 'Enum %s has no value defined for name %s', __CLASS__, $name)); } return constant($const); } }