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


PHP Framework::isDebugEnabled方法代码示例

本文整理汇总了PHP中Framework::isDebugEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP Framework::isDebugEnabled方法的具体用法?PHP Framework::isDebugEnabled怎么用?PHP Framework::isDebugEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Framework的用法示例。


在下文中一共展示了Framework::isDebugEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getItems

 /**
  * @return array<list_Item>
  */
 public final function getItems()
 {
     try {
         $request = Controller::getInstance()->getContext()->getRequest();
         $questionId = intval($request->getParameter('questionId', 0));
         $question = DocumentHelper::getDocumentInstance($questionId);
     } catch (Exception $e) {
         if (Framework::isDebugEnabled()) {
             Framework::debug(__METHOD__ . ' EXCEPTION: ' . $e->getMessage());
         }
         return array();
     }
     // Here we must use instanceof and not getDocumentModelName to work with injection.
     $results = array();
     if ($question instanceof form_persistentdocument_boolean) {
         $trueLabel = $question->getTruelabel();
         $falseLabel = $question->getFalselabel();
         $results[$trueLabel] = new list_Item($trueLabel, $trueLabel);
         $results[$falseLabel] = new list_Item($falseLabel, $falseLabel);
     } else {
         if ($question instanceof form_persistentdocument_list) {
             $results = $question->getDataSource()->getItems();
         }
     }
     return $results;
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:29,代码来源:ListActivationvaluesService.class.php

示例2: preSave

 /**
  * @param form_persistentdocument_field $document
  * @param Integer $parentNodeId Parent node ID where to save the document (optionnal).
  * @return void
  */
 protected function preSave($document, $parentNodeId = null)
 {
     $fieldName = $document->getFieldName();
     if (f_util_StringUtils::isEmpty($fieldName)) {
         $this->fieldNameCounter = $this->fieldNameCounter + 1;
         $fieldName = 'f' . time() . $this->fieldNameCounter;
         if (Framework::isDebugEnabled()) {
             Framework::debug(__METHOD__ . ' Generate FieldName: ' . $fieldName . ' for document ' . $document->__toString());
         }
         $document->setFieldName($fieldName);
     }
     $parentDoc = $parentNodeId != null ? DocumentHelper::getDocumentInstance($parentNodeId) : $this->getParentOf($document);
     form_BaseformService::getInstance()->checkFieldNameAvailable($document, $parentDoc->getId());
     $this->fixRequiredConstraint($document);
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:20,代码来源:FieldService.class.php

示例3: sendAcknowledgement

 /**
  * @param form_persistentdocument_baseform $form
  * @param form_persistentdocument_response $response
  * @param block_BlockRequest $request
  * @param array $result
  * @param String $acknowledgmentReceiver
  * @param String $replyTo
  * @return void
  */
 protected function sendAcknowledgement($form, $response, $request, $result, $acknowledgmentReceiver, $replyTo)
 {
     $recipients = new mail_MessageRecipients();
     $recipients->setTo(array($acknowledgmentReceiver));
     $parameters = $this->getAcknowledgementNotificationParameters($form, $response, $request, $result, $acknowledgmentReceiver, $replyTo);
     if (Framework::isDebugEnabled()) {
         Framework::debug(__METHOD__ . " Form \"" . $form->getLabel() . "\" (id=" . $form->getId() . ")");
         Framework::debug(__METHOD__ . " Parameters: " . var_export($parameters, true));
         Framework::debug(__METHOD__ . " To      : " . join(", ", $recipients->getTo()));
         Framework::debug(__METHOD__ . " ReplyTo : " . $replyTo);
     }
     $ns = notification_NotificationService::getInstance();
     $ns->setMessageService(MailService::getInstance());
     $notification = $form->getAcknowledgmentNotification();
     $senderEmail = $this->getOverrideNotificationSender($form);
     return $ns->send($notification, $recipients, $parameters, 'form', $replyTo, $senderEmail);
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:26,代码来源:BaseformService.class.php

示例4: sendEmail

 /**
  * @param form_persistentdocument_form $form
  * @param form_persistentdocument_response $response
  * @param block_BlockRequest $request
  * @param String $copyMail
  * @param String $replyTo
  * @return void
  */
 private function sendEmail($form, $response, $request, $copyMail, $replyTo)
 {
     $recipients = new mail_MessageRecipients();
     if ($request->hasParameter('receiverIds')) {
         $this->handleReceveirIds($request->getParameter('receiverIds'), $recipients);
     }
     // Determine the message recipients for this form.
     // Note that the following method may be overriden to allow the developper
     // to build specific mail recipients, depending on the request data for
     // example.
     $this->buildMessageRecipients($form, $recipients, $request);
     if (!$recipients->isEmpty()) {
         if ($form->getMessageSendingType() == self::SEND_EMAIL_AND_APPEND_TO_MAILBOX) {
             $messageService = mailbox_MessageService::getInstance();
             Framework::debug(__METHOD__ . " Getting mailbox_MessageService instance.");
         } else {
             $messageService = MailService::getInstance();
             Framework::debug(__METHOD__ . " Getting MailService instance.");
         }
         $contentTemplate = TemplateLoader::getInstance()->setPackageName('modules_form')->setMimeContentType(K::HTML)->load('Form-MailContent');
         $contentTemplate->setAttribute('items', $response->getAllData());
         $contentTemplate->setAttribute('response', $response->getResponseInfos());
         $parameters = $response->getData();
         $parameters[self::CONTENT_REPLACEMENT_NAME] = $contentTemplate->execute();
         $parameters[self::FORM_LABEL_REPLACEMENT_NAME] = $form->getLabel();
         if (Framework::isDebugEnabled()) {
             Framework::debug(__METHOD__ . " Form \"" . $form->getLabel() . "\" (id=" . $form->getId() . ")");
             Framework::debug(__METHOD__ . " Parameters: " . var_export($parameters, true));
             if ($recipients->hasTo()) {
                 Framework::debug(__METHOD__ . " To      : " . join(", ", $recipients->getTo()));
             }
             if ($recipients->hasBCC()) {
                 Framework::debug(__METHOD__ . " CC      : " . join(", ", $recipients->getCC()));
             }
             if ($recipients->hasBCC()) {
                 Framework::debug(__METHOD__ . " BCC     : " . join(", ", $recipients->getBcc()));
             }
             Framework::debug(__METHOD__ . " ReplyTo : " . $replyTo);
         }
         $ns = notification_NotificationService::getInstance();
         $ns->setMessageService($messageService);
         if ($copyMail === null) {
             return $ns->send($form->getNotification(), $recipients, $parameters, 'form', $replyTo, $this->getOverrideNotificationSender($form));
         } else {
             $copyRecipient = new mail_MessageRecipients();
             $copyRecipient->setTo(array($copyMail));
             $notification = $form->getNotification();
             $sender = $this->getOverrideNotificationSender($form);
             return $ns->send($notification, $recipients, $parameters, 'form', $replyTo, $sender) && $ns->send($notification, $copyRecipient, $parameters, 'form', $replyTo, $sender);
         }
     }
     return true;
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:61,代码来源:FormService.class.php


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