本文整理匯總了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);
}