blob: 11a00247280198cc9bb7adb8c19f53160bda2894 [file] [log] [blame]
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proto/gtfs.proto
namespace Gtfs\CalendarDate;
use UnexpectedValueException;
/**
* Protobuf type <code>gtfs.CalendarDate.ExceptionType</code>
*/
class ExceptionType
{
/**
* Generated from protobuf enum <code>UNUSED_UNKNOWN = 0;</code>
*/
const UNUSED_UNKNOWN = 0;
/**
* Generated from protobuf enum <code>ADDED = 1;</code>
*/
const ADDED = 1;
/**
* Generated from protobuf enum <code>REMOVED = 2;</code>
*/
const REMOVED = 2;
private static $valueToName = [
self::UNUSED_UNKNOWN => 'UNUSED_UNKNOWN',
self::ADDED => 'ADDED',
self::REMOVED => 'REMOVED',
];
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);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ExceptionType::class, \Gtfs\CalendarDate_ExceptionType::class);