12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- class LctvApiHelpers {
-
- public static function ValidateConstants( $constants ) {
- foreach ($constants as $constant) {
- if ( ! defined( $constant ) ) {
- throw new Exception(CONSTANT_UNDEFINED_MSG . $constant, 1);
- }
- }
- }
-
- public static function SanitizeGetParam( $param_name, $default_value ) {
- return ( ! empty( $param_name ) &&
- isset( $_GET[$param_name] ) &&
- ! empty( $_GET[$param_name] ) ) ?
- strtolower( htmlspecialchars( $_GET[$param_name] ) ) :
- $default_value;
- }
- }
- ?>
|