WPR FM
uid=9814(b13i2mwmyrdbxio) php=8.4.28
info
cwd /data/sites/web/b13i2mwmyrdbxio/www |
naik
Buka
-
class-builder.php
2366
x
-
class-from.php
695
x
-
class-group.php
346
x
-
class-query.php
5911
x
-
class-value.php
1497
x
D
join/
D
modifier/
D
select/
D
where/
Upload
Simpan
<?php namespace SearchRegex\Sql; /** * A simple sanitizer for table names, column names, and raw (pre-sanitized) names. This shouldn't be treated as a replacement for $wpdb->prepare, and is just * a way of being extra-paranoid when forming queries with known column and table names. */ class Value { /** * Underlying value * * @readonly */ private string $value; /** * Constructor * * @param string $value Value. */ public function __construct( $value ) { $this->value = $value; } /** * Get the sanitized value. * * @return string */ public function get_value() { return $this->value; } /** * Create a Value with a known sanitized value. You should only use this when you are sure the value is safe. * * @param string $value Value. * @return Value */ public static function safe_raw( $value ) { return new Value( $value ); } /** * Create a Value for a SQL column. Performs column sanitization and allows for column aliases * * @param string $column Column name. * @return Value */ public static function column( $column ) { $column = (string) preg_replace( '/[^ A-Za-z0-9_\-\.]/', '', $column ); return new Value( $column ); } /** * Create a Value for a SQL table name. Performs table name sanitization. * * @param string $table Table name. * @return Value */ public static function table( $table ) { $table = (string) preg_replace( '/[^A-Za-z0-9_\-]/', '', $table ); return new Value( $table ); } }
Exec