本文整理汇总了PHP中XHPASTNode::getLineNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP XHPASTNode::getLineNumber方法的具体用法?PHP XHPASTNode::getLineNumber怎么用?PHP XHPASTNode::getLineNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XHPASTNode
的用法示例。
在下文中一共展示了XHPASTNode::getLineNumber方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_symbol
function print_symbol($file, $type, XHPASTNode $node, $context = null)
{
$parts = array($context ? $context->getConcreteString() : '', ltrim($node->getConcreteString(), '$'), $type, 'php', $node->getLineNumber(), '/' . ltrim($file, './'));
echo implode(' ', $parts) . "\n";
}
示例2: phutil_fail_on_unsupported_feature
function phutil_fail_on_unsupported_feature(XHPASTNode $node, $file, $what)
{
$line = $node->getLineNumber();
$message = phutil_console_wrap(pht('`%s` has limited support for features introduced after PHP 5.2.3. ' . 'This library uses an unsupported feature (%s) on line %d of %s.', 'arc liberate', $what, $line, Filesystem::readablePath($file)));
$result = array('error' => $message, 'line' => $line, 'file' => $file);
$json = new PhutilJSON();
echo $json->encodeFormatted($result);
exit(0);
}