1 | <?php |
||
38 | class Plan extends Model |
||
39 | { |
||
40 | public const TYPE_SERVER = 'server'; |
||
41 | public const TYPE_PCDN = 'pcdn'; |
||
42 | public const TYPE_VCDN = 'vcdn'; |
||
43 | public const TYPE_TEMPLATE = 'template'; |
||
44 | public const TYPE_CERTIFICATE = 'certificate'; |
||
45 | public const TYPE_DOMAIN = 'domain'; |
||
46 | public const TYPE_SWITCH = 'switch'; |
||
47 | public const TYPE_AVDS = 'avds'; |
||
48 | public const TYPE_OVDS = 'ovds'; |
||
49 | public const TYPE_SVDS = 'svds'; |
||
50 | public const TYPE_CLIENT = 'client'; |
||
51 | public const TYPE_HARDWARE = 'hardware'; |
||
52 | public const TYPE_ANYCASTCDN = 'anycastcdn'; |
||
53 | |||
54 | protected $knownTypes = [ |
||
55 | self::TYPE_SERVER => self::TYPE_SERVER, |
||
56 | self::TYPE_PCDN => self::TYPE_PCDN, |
||
57 | self::TYPE_VCDN => self::TYPE_VCDN, |
||
58 | self::TYPE_TEMPLATE => self::TYPE_TEMPLATE, |
||
59 | self::TYPE_CERTIFICATE => self::TYPE_CERTIFICATE, |
||
60 | self::TYPE_DOMAIN => self::TYPE_DOMAIN, |
||
61 | self::TYPE_SWITCH => self::TYPE_SWITCH, |
||
62 | self::TYPE_AVDS => self::TYPE_AVDS, |
||
63 | self::TYPE_OVDS => self::TYPE_OVDS, |
||
64 | self::TYPE_SVDS => self::TYPE_SVDS, |
||
65 | self::TYPE_CLIENT => self::TYPE_CLIENT, |
||
66 | self::TYPE_HARDWARE => self::TYPE_HARDWARE, |
||
67 | self::TYPE_ANYCASTCDN => self::TYPE_ANYCASTCDN, |
||
68 | ]; |
||
69 | |||
70 | use ModelTrait; |
||
71 | |||
72 | /** |
||
73 | * @var string |
||
74 | */ |
||
75 | public $monthly; |
||
76 | |||
77 | public $servers = []; |
||
78 | |||
79 | public function rules() |
||
92 | |||
93 | public function attributeLabels() |
||
104 | |||
105 | public function getPrices() |
||
113 | |||
114 | public function getPriceHistory() |
||
118 | |||
119 | public function getDesiredPriceClass() |
||
127 | |||
128 | public function getSales() |
||
132 | |||
133 | public function getTypeOptions() |
||
137 | |||
138 | public function getStateOptions() |
||
142 | |||
143 | public function isDeleted(): bool |
||
147 | |||
148 | public function supportsSharedPrices(): bool |
||
152 | |||
153 | /** |
||
154 | * {@inheritdoc} |
||
155 | * @return PlanQuery |
||
156 | */ |
||
157 | public static function find($options = []) |
||
163 | |||
164 | public function isKnownType(string $type = null): bool |
||
168 | } |
||
169 |