本文整理匯總了PHP中zibo\library\String::addLineNumbers方法的典型用法代碼示例。如果您正苦於以下問題:PHP String::addLineNumbers方法的具體用法?PHP String::addLineNumbers怎麽用?PHP String::addLineNumbers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類zibo\library\String
的用法示例。
在下文中一共展示了String::addLineNumbers方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructs a new XML-RPC client view
* @param zibo\xmlrpc\form\ClientForm $form The form of the client
* @param zibo\library\xmlrpc\Request $request
* @param zibo\library\xmlrpc\Response $response
* @param string $responseString
* @param float $time Time spent on the request in seconds
* @return null
*/
public function __construct(ClientForm $form, Request $request = null, Response $response = null, $responseString = null, $time = null)
{
parent::__construct(self::TEMPLATE);
$this->set('form', $form);
$this->set('time', $time);
$this->set('requestString', null);
$this->set('responseString', null);
if ($request) {
$this->set('requestString', String::addLineNumbers(trim($request->getXmlString())));
}
if ($responseString && !$response) {
$this->set('responseString', String::addLineNumbers(trim($responseString)));
} elseif ($response) {
$this->set('responseString', String::addLineNumbers(trim($response->getXmlString())));
$errorCode = $response->getErrorCode();
if ($errorCode) {
$this->set('error', $errorCode . ': ' . $response->getErrorMessage());
} else {
$parser = new ParameterParser();
$result = $parser->unparse($response->getValue(), true);
$this->set('result', $result);
}
}
$this->addStyle(self::STYLE);
}