本文整理匯總了PHP中Framework::info方法的典型用法代碼示例。如果您正苦於以下問題:PHP Framework::info方法的具體用法?PHP Framework::info怎麽用?PHP Framework::info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Framework
的用法示例。
在下文中一共展示了Framework::info方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: _execute
/**
* @param Context $context
* @param Request $request
*/
public function _execute($context, $request)
{
$forms = $this->getDocumentInstanceArrayFromRequest($request);
$responseArchivedCount = 0;
foreach ($forms as $form) {
$responseArchivedCount += form_FormService::getInstance()->fileResponses($form);
}
if (Framework::isInfoEnabled()) {
Framework::info('form/ArchiveResponse -> Filed responses : ' . $responseArchivedCount);
}
$request->setAttribute('message', $responseArchivedCount);
return self::getSuccessView();
}
示例2: saveFormData
/**
* @param form_persistentdocument_baseform $form
* @param block_BlockRequest $request
* @return void
*/
public function saveFormData($form, $request)
{
$errors = new validation_Errors();
$this->validate($form, $request, $errors);
if (!$errors->isEmpty()) {
throw new form_FormValidationException("Form does not validate", $errors);
}
$domDoc = new DOMDocument('1.0', 'utf-8');
$domDoc->formatOutput = true;
$rootElm = $domDoc->createElement('response');
$rootElm->setAttribute('lang', RequestContext::getInstance()->getLang());
$rootElm->setAttribute('date', date('Y-m-d H:i:s'));
$domDoc->appendChild($rootElm);
$fields = $this->getSortedFields($form);
$replyTo = null;
$acknowledgmentReceiver = null;
$this->doMakeXmlResponse($domDoc, $rootElm, $request, $replyTo, $acknowledgmentReceiver, $form);
$response = form_ResponseService::getInstance()->getNewDocumentInstance();
$response->setContents($domDoc->saveXML());
$response->setLabel(f_Locale::translate("&modules.form.bo.general.Form-response-title;", array('form' => $form->getLabel())));
// Handle specific treatments.
$result = $this->handleData($form, $fields, $response, $request, $replyTo);
// Acknowledgment.
if ($result['success'] && $form->getAcknowledgment() && $acknowledgmentReceiver !== null) {
if (!$this->sendAcknowledgement($form, $response, $request, $result, $acknowledgmentReceiver, $replyTo)) {
Framework::info(__METHOD__ . " An error occured during acknowledgment sending to " . $acknowledgmentReceiver);
}
}
return $result;
}