示例#1
0
 public function __construct()
 {
     $this->sources = new Sequence();
     $this->sources->push(http\HttpGet::getInstance());
     $this->sources->push(http\HttpPut::getInstance());
     $this->sources->push(http\HttpPost::getInstance());
     $this->sources->push(router\RouteArgs::getInstance());
 }
示例#2
0
 function __construct()
 {
     $post = HttpPost::getInstance();
     /** @var \ReflectionProperty $property */
     foreach ((new \ReflectionClass($this))->getProperties() as $property) {
         if ($property->isStatic() || substr($property->getName(), 0, 1) == "_") {
             continue;
         }
         $property->setAccessible(true);
         $property->setValue($this, $post->get($property->getName()));
     }
     $this->validate();
 }