php.runtime.Memory.valueOfIndex()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中php.runtime.Memory.valueOfIndex()方法的一些代码示例,展示了Memory.valueOfIndex()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Memory.valueOfIndex()方法的具体详情如下:
包路径:php.runtime.Memory
类名称:Memory
方法名:valueOfIndex

Memory.valueOfIndex介绍

暂无

代码示例

代码示例来源:origin: jphp-group/jphp

final public Memory valueOfIndex(double index) { return valueOfIndex(null, index); }

代码示例来源:origin: jphp-group/jphp

final public Memory valueOfIndex(String index) { return valueOfIndex(null, index); }

代码示例来源:origin: jphp-group/jphp

final public Memory valueOfIndex(Memory index) { return valueOfIndex(null, index); }
public Memory valueOfIndex(TraceInfo trace, Memory index) { return NULL; }

代码示例来源:origin: jphp-group/jphp

public static Memory valueForList(Memory memory, String index) {
  if (memory.isArray()) {
    return memory.valueOfIndex(index);
  } else {
    return Memory.NULL;
  }
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, String index) {
  return getValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, long index) {
  return toValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

public static Memory valueForList(Memory memory, long index) {
  if (memory.isArray()) {
    return memory.valueOfIndex(index);
  } else {
    return Memory.NULL;
  }
}

代码示例来源:origin: jphp-group/jphp

public static Memory valueForList(Memory memory, Memory index) {
  if (memory.isArray()) {
    return memory.valueOfIndex(index);
  } else {
    return Memory.NULL;
  }
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, double index) {
  return getValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, long index) {
  return getValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, boolean index) {
  return getValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, Memory index) {
  return toValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, boolean index) {
  return toValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, Memory index) {
  return getValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, double index) {
  return toValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Override
public Memory valueOfIndex(TraceInfo trace, String index) {
  return toValue().valueOfIndex(trace, index);
}

代码示例来源:origin: jphp-group/jphp

@Signature
public PMarkdownOptions addSubscriptExtension(@Arg(type = HintType.ARRAY) @Optional("null") Memory options) {
  parserExtensions.add(SubscriptExtension.create());
  Memory htmlOpen = options.valueOfIndex("htmlOpen");
  if (htmlOpen.isNotNull()) {
    this.options.set(SubscriptExtension.SUBSCRIPT_STYLE_HTML_OPEN, htmlOpen.toString());
  }
  Memory htmlClose = options.valueOfIndex("htmlClose");
  if (htmlOpen.isNotNull()) {
    this.options.set(SubscriptExtension.SUBSCRIPT_STYLE_HTML_CLOSE, htmlClose.toString());
  }
  return this;
}

代码示例来源:origin: jphp-group/jphp

@Override
public CountOptions convert(Environment env, TraceInfo trace, Memory arg) throws Throwable {
  if (arg.isNull()) return null;
  ArrayMemory arr = arg.toValue(ArrayMemory.class);
  CountOptions options = new CountOptions();
  if (arr.containsKey("skip")) options.skip(arg.valueOfIndex("skip").toInteger());
  if (arr.containsKey("limit")) options.limit(arg.valueOfIndex("limit").toInteger());
  if (arr.containsKey("maxTime")) {
    options.maxTime(WrapTimer.parsePeriod(arg.valueOfIndex("maxTime").toString()), TimeUnit.MILLISECONDS);
  }
  return options;
}

代码示例来源:origin: jphp-group/jphp

@Signature
public PMarkdownOptions addSuperscriptExtension(@Arg(type = HintType.ARRAY) @Optional("null") Memory options) {
  parserExtensions.add(SuperscriptExtension.create());
  Memory htmlOpen = options.valueOfIndex("htmlOpen");
  if (htmlOpen.isNotNull()) {
    this.options.set(SuperscriptExtension.SUPERSCRIPT_STYLE_HTML_OPEN, htmlOpen.toString());
  }
  Memory htmlClose = options.valueOfIndex("htmlClose");
  if (htmlOpen.isNotNull()) {
    this.options.set(SuperscriptExtension.SUPERSCRIPT_STYLE_HTML_CLOSE, htmlClose.toString());
  }
  return this;
}

代码示例来源:origin: jphp-group/jphp

@Test
public void testArrayReturn() {
  Memory memory = runDynamic("$baseDir = 'foobar_'; return array(" +
      "    'a' => $baseDir . 'bla',);", false);
  Assert.assertTrue(memory.isArray());
  Assert.assertEquals("foobar_bla", memory.valueOfIndex("a").toString());
  Assert.assertEquals(1, memory.toValue(ArrayMemory.class).size());
}

相关文章