Пример #1
0
 public function __construct()
 {
     global $wpdb;
     global $wp_version;
     parent::getVars();
     self::$instance = $this;
     $this->args = array('timeout' => 30, 'redirection' => 5, 'httpversion' => '1.1', 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url'), 'blocking' => true, 'headers' => array('date' => date("D j M Y H:i:s T", $this->wp_time), 'x-powered-by' => $this->plugin_name, 'x-server' => $this->plugin_version, 'expires' => date("D j M Y H:i:s T", strtotime("+3 hours", $this->wp_time)), 'vary' => 'Accept-Encoding', 'connection' => 'close', 'accept' => 'application/json', 'content-type' => 'application/json'), 'cookies' => array(), 'body' => null, 'compress' => false, 'decompress' => true, 'sslverify' => true, 'stream' => false);
 }
Пример #2
0
 public function __construct($properties)
 {
     parent::getVars();
     if ($properties === null || empty($properties)) {
         return false;
     }
     foreach ($properties as $key => $value) {
         $this->{$key} = $value;
     }
     $this->sanitize = new Service\Sanitize();
 }