diff --git a/upload/system/library/PagSeguro/src/Constants/AbstractEnum.php b/upload/system/library/PagSeguro/src/Constants/AbstractEnum.php new file mode 100644 index 0000000..7f1f333 --- /dev/null +++ b/upload/system/library/PagSeguro/src/Constants/AbstractEnum.php @@ -0,0 +1,55 @@ +getConstants(); + } + + return self::$enums[$calledClass]; + } + + /** + * Verifica se determinada chave existe + * + * @return bool + */ + public static function has($name): bool + { + return array_key_exists($name, self::getEnums()); + } + + /** + * Verifica se determinado valor existe + * + * @return bool + */ + public static function isValidValue($value): bool + { + $values = array_values(self::getEnums()); + return in_array($value, $values); + } +} diff --git a/upload/system/library/PagSeguro/src/Constants/Shipping/Type.php b/upload/system/library/PagSeguro/src/Constants/Shipping/Type.php new file mode 100644 index 0000000..0d8fb5b --- /dev/null +++ b/upload/system/library/PagSeguro/src/Constants/Shipping/Type.php @@ -0,0 +1,12 @@ +