本文整理汇总了PHP中Value::handle方法的典型用法代码示例。如果您正苦于以下问题:PHP Value::handle方法的具体用法?PHP Value::handle怎么用?PHP Value::handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Value
的用法示例。
在下文中一共展示了Value::handle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
/**
*
* @param Context $context
*/
public function handle(Context $context)
{
$string = new StringExpr();
$string->handle($context);
$this->key = $string->getResult();
$nameSeparator = new StructuralChar(array(":"));
$nameSeparator->handle($context);
$value = new Value();
$value->handle($context);
$this->value = $value->getResult();
}
示例2: handle
/**
*
* @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();
}
示例3: handle
/**
*
* @param Context $context
*/
public function handle(Context $context)
{
$beginArray = new StructuralChar(array("["));
$beginArray->handle($context);
if ($context->current() === "]") {
$endArray = new StructuralChar(array("]"));
$endArray->handle($context);
$this->result = array();
return;
}
$result = array();
while (true) {
$value = new Value();
$value->handle($context);
$result[] = $value->getResult();
$struct = new StructuralChar(array(",", "]"));
$struct->handle($context);
if ($struct->getResult() === "]") {
$this->result = $result;
break;
}
}
}