PluginProbe
Image Optimizer – Compress Images and Convert to WebP or AVIF / 1.7.4
Image Optimizer – Compress Images and Convert to WebP or AVIF v1.7.4
1.7.7 1.7.6 1.7.5 1.7.4 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 All 33 releases
image-optimization / vendor / elementor / wp-one-package / src / Common / BasicEnum.php

BasicEnum.php in Image Optimizer – Compress Images and Convert to WebP or AVIF 1.7.4, at vendor/elementor/wp-one-package/src/Common/BasicEnum.php

41 lines 712 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace ElementorOne\Common;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly.
7 }
8
9 /*
10 * BasicEnum class
11 */
12 abstract class BasicEnum {
13
14 /**
15 * Entries
16 * @var array
17 */
18 private static array $entries = [];
19
20 /**
21 * @throws \ReflectionException
22 */
23 public static function get_values(): array {
24 return array_values( self::get_entries() );
25 }
26
27 /**
28 * @throws \ReflectionException
29 */
30 protected static function get_entries(): array {
31 $caller = get_called_class();
32
33 if ( ! array_key_exists( $caller, self::$entries ) ) {
34 $reflect = new \ReflectionClass( $caller );
35 self::$entries[ $caller ] = $reflect->getConstants();
36 }
37
38 return self::$entries[ $caller ];
39 }
40 }
41