Example #1
0
 /**
  * 构造方法
  */
 public function __construct()
 {
     $request = Request::createFromGlobals();
     $content = $request->getContent();
     if (!empty($content)) {
         $this->_option = Serialize::decode($content, 'xml');
     }
 }
Example #2
0
 /**
  * 构造方法
  */
 public function __construct()
 {
     $this->content = file_get_contents('php://input');
     if (!empty($this->content)) {
         $data = Serialize::decode($this->content, 'xml');
         try {
             parent::__construct($data);
             $this->valid = true;
         } catch (\InvalidArgumentException $e) {
             $this->error = $e->getMessage();
         }
     }
 }