当前位置: 首页>>代码示例>>PHP>>正文


PHP Framework::info方法代码示例

本文整理汇总了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();
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:17,代码来源:ArchiveResponseAction.class.php

示例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;
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:35,代码来源:BaseformService.class.php


注:本文中的Framework::info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。