blob: 460a6dcf7db417344cbc67958c2136b6a8a08bc2 [file] [log] [blame]
avm9996399bb77c2020-01-27 03:15:08 +01001<?php
2# Generated by the protocol buffer compiler. DO NOT EDIT!
3# source: proto/gtfs.proto
4
5namespace Gtfs\Stop;
6
7use UnexpectedValueException;
8
9/**
10 * Protobuf type <code>gtfs.Stop.WheelchairBoarding</code>
11 */
12class WheelchairBoarding
13{
14 /**
15 * no accessibility information for the stop
16 *
17 * Generated from protobuf enum <code>UNKNOWN = 0;</code>
18 */
19 const UNKNOWN = 0;
20 /**
21 * some vehicles at this stop can be boarded by a rider in a wheelchair
22 *
23 * Generated from protobuf enum <code>ACCESSIBLE = 1;</code>
24 */
25 const ACCESSIBLE = 1;
26 /**
27 * wheelchair boarding is not possible at this stop
28 *
29 * Generated from protobuf enum <code>NOT_ACCESSIBLE = 2;</code>
30 */
31 const NOT_ACCESSIBLE = 2;
32
33 private static $valueToName = [
34 self::UNKNOWN => 'UNKNOWN',
35 self::ACCESSIBLE => 'ACCESSIBLE',
36 self::NOT_ACCESSIBLE => 'NOT_ACCESSIBLE',
37 ];
38
39 public static function name($value)
40 {
41 if (!isset(self::$valueToName[$value])) {
42 throw new UnexpectedValueException(sprintf(
43 'Enum %s has no name defined for value %s', __CLASS__, $value));
44 }
45 return self::$valueToName[$value];
46 }
47
48
49 public static function value($name)
50 {
51 $const = __CLASS__ . '::' . strtoupper($name);
52 if (!defined($const)) {
53 throw new UnexpectedValueException(sprintf(
54 'Enum %s has no value defined for name %s', __CLASS__, $name));
55 }
56 return constant($const);
57 }
58}
59
60// Adding a class alias for backwards compatibility with the previous class name.
61class_alias(WheelchairBoarding::class, \Gtfs\Stop_WheelchairBoarding::class);
62