|
Server IP : 10.106.20.8 / Your IP : 216.73.216.148 Web Server : Apache System : Linux webm008.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : sixiemesrc ( 611999) PHP Version : 8.0.30 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/sixiemesrc/new/wp-content/cache/../plugins/image-optimization/classes/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
namespace ImageOptimization\Classes;
use ReflectionClass;
use ReflectionException;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
abstract class Basic_Enum {
private static array $entries = [];
/**
* @throws ReflectionException
*/
public static function get_values(): array {
return array_values( self::get_entries() );
}
/**
* @throws ReflectionException
*/
protected static function get_entries(): array {
$caller = get_called_class();
if ( ! array_key_exists( $caller, self::$entries ) ) {
$reflect = new ReflectionClass( $caller );
self::$entries[ $caller ] = $reflect->getConstants();
}
return self::$entries[ $caller ];
}
}