예제 #1
0
 /**
  * 
  * @param Context $context
  */
 public function handle(Context $context)
 {
     $ws = WS::getInstance();
     $ws->handle($context);
     if (!$context->hasNext()) {
         $context->throwException("Unexpected end of JSON");
     }
     $this->handleChar($context);
     $ws->handle($context);
 }
예제 #2
0
파일: Root.php 프로젝트: trashtoy/peach2
 /**
  * 
  * @param Context $context
  * @throws DecodeException
  */
 public function handle(Context $context)
 {
     $ws = WS::getInstance();
     $ws->handle($context);
     $value = new Value();
     $value->handle($context);
     $ws->handle($context);
     if ($context->hasNext()) {
         $current = $context->current();
         $context->throwException("Unexpected character('{$current}')");
     }
     $this->result = $value->getResult();
 }