本文整理汇总了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;
}