本文整理汇总了PHP中ocp_tempcode::parameterless方法的典型用法代码示例。如果您正苦于以下问题:PHP ocp_tempcode::parameterless方法的具体用法?PHP ocp_tempcode::parameterless怎么用?PHP ocp_tempcode::parameterless使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ocp_tempcode
的用法示例。
在下文中一共展示了ocp_tempcode::parameterless方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: comcode_text_to_tempcode
//.........这里部分代码省略.........
while ($pos + $p_len < $len) {
$p_portion = substr($comcode, $pos - 1, $p_len);
if (substr_count(str_replace('{', ' { ', $p_portion), '{') == substr_count(str_replace('}', ' } ', $p_portion), '}')) {
break;
}
// str_replace is to workaround a Quercus bug #4494
$p_len++;
}
$p_len--;
$p_portion = substr($comcode, $pos + $p_len, $p_end - ($pos + $p_len));
require_code('tempcode_compiler');
$ret = template_to_tempcode(substr($comcode, $pos - 1, $p_len + 1) . '{DIRECTIVE_EMBEDMENT}' . substr($comcode, $p_end, 6));
$attaches_before = count($COMCODE_ATTACHMENTS[$pass_id]);
$ret->singular_bind('DIRECTIVE_EMBEDMENT', comcode_text_to_tempcode($p_portion, $source_member, $as_admin, $wrap_pos, $pass_id, $connection, $semiparse_mode, $preparse_mode, $in_semihtml, $structure_sweep, $check_only, $highlight_bits, $on_behalf_of_member));
for ($attach_inspect = $attaches_before; $attach_inspect < count($COMCODE_ATTACHMENTS[$pass_id]); $attach_inspect++) {
$COMCODE_ATTACHMENTS[$pass_id][$attach_inspect]['marker'] += $pos + $p_len;
}
$pos = $p_end + 6;
} elseif ($comcode[$pos] == '!') {
$p_len = $pos;
$balance = 1;
while ($p_len < $len && $balance != 0) {
if ($comcode[$p_len] == '{') {
$balance++;
} elseif ($comcode[$p_len] == '}') {
$balance--;
}
$p_len++;
}
$ret = new ocp_tempcode();
$less_pos = $pos - 1;
$ret->parse_from($comcode, $less_pos, $p_len);
$pos = $p_len;
if ($ret->parameterless(0) && $pos < $len) {
$matches = array();
if (preg_match('#\\{\\!([\\w\\d\\_\\:]+)(\\}|$)#U', substr($comcode, $less_pos, $p_len - $less_pos), $matches) != 0) {
$temp_lang_string = $matches[1];
$ret = comcode_lang_string($temp_lang_string);
// Recreate as a Comcode lang string
}
}
} else {
$p_len = $pos;
$balance = 1;
while ($p_len < $len && $balance != 0) {
if ($comcode[$p_len] == '{') {
$balance++;
} elseif ($comcode[$p_len] == '}') {
$balance--;
}
$p_len++;
}
$ret = new ocp_tempcode();
$less_pos = $pos - 1;
$ret->parse_from($comcode, $less_pos, $p_len);
$pos = $p_len;
}
$differented = true;
if ($pos <= $len || !$lax) {
$tag_output->attach($ret);
}
}
} else {
if ($comcode[$pos] == '$' && $pos < $len - 2 && $comcode[$pos + 1] == ',' && strpos($comcode, '}', $pos) !== false) {
$pos = strpos($comcode, '}', $pos) + 1;
$differented = true;