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


PHP Logger::notice方法代码示例

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


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

示例1: paymentAction

 public function paymentAction()
 {
     $gateway = $this->getModule()->getGateway();
     if (!$gateway->supportsPurchase()) {
         \Pimcore\Logger::error("OmniPay Gateway payment [" . $this->getModule()->getName() . "] does not support purchase");
         throw new \CoreShop\Exception("Gateway doesn't support purchase!");
     }
     $params = $this->getGatewayParams();
     $response = $gateway->purchase($params)->send();
     if ($response instanceof \Omnipay\Common\Message\ResponseInterface) {
         if ($response->getTransactionReference()) {
             $this->cart->setCustomIdentifier($response->getTransactionReference());
         } else {
             $this->cart->setCustomIdentifier($params['transactionId']);
         }
         $this->cart->save();
         try {
             if ($response->isSuccessful()) {
                 \Pimcore\Logger::notice("OmniPay Gateway payment [" . $this->getModule()->getName() . "]: Gateway successfully responded redirect!");
                 $this->redirect($params['returnUrl']);
             } else {
                 if ($response->isRedirect()) {
                     if ($response instanceof \Omnipay\Common\Message\RedirectResponseInterface) {
                         \Pimcore\Logger::notice("OmniPay Gateway payment [" . $this->getModule()->getName() . "]: response is a redirect. RedirectMethod: " . $response->getRedirectMethod());
                         if ($response->getRedirectMethod() === "GET") {
                             $this->redirect($response->getRedirectUrl());
                         } else {
                             $this->view->response = $response;
                             $this->_helper->viewRenderer('payment/post', null, true);
                         }
                     }
                 } else {
                     throw new \CoreShop\Exception($response->getMessage());
                 }
             }
         } catch (\Exception $e) {
             \Pimcore\Logger::error("OmniPay Gateway payment [" . $this->getModule()->getName() . "] Error: " . $e->getMessage());
         }
     }
 }
开发者ID:coreshop,项目名称:omnipay,代码行数:40,代码来源:PaymentController.php

示例2: checkValidity

 /**
  * @return bool
  */
 public function checkValidity()
 {
     $sane = true;
     if ($this->type == "asset" && !empty($this->id)) {
         $el = Asset::getById($this->id);
         if (!$el instanceof Asset) {
             $sane = false;
             Logger::notice("Detected insane relation, removing reference to non existent asset with id [" . $this->id . "]");
             $this->id = null;
             $this->type = null;
         }
     }
     if (!($poster = Asset::getById($this->poster))) {
         $sane = false;
         Logger::notice("Detected insane relation, removing reference to non existent asset with id [" . $this->id . "]");
         $this->poster = null;
     }
     return $sane;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:22,代码来源:Video.php

示例3: checkValidity

 /**
  * @return bool
  */
 public function checkValidity()
 {
     $sane = true;
     if ($this->id) {
         $el = Element\Service::getElementById($this->type, $this->id);
         if (!$el instanceof Element\ElementInterface) {
             $sane = false;
             Logger::notice("Detected insane relation, removing reference to non existent " . $this->type . " with id [" . $this->id . "]");
             $this->id = null;
             $this->type = null;
             $this->o = null;
             $this->subtype = null;
         }
     }
     return $sane;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:19,代码来源:Renderlet.php

示例4: paymentReturnAction

 /**
  * This Action can be called via Frontend
  * @throws \CoreShop\Exception
  * @throws \CoreShop\Exception\ObjectUnsupportedException
  */
 public function paymentReturnAction()
 {
     $requestData = $this->parseRequestData();
     $this->disableLayout();
     $this->disableViewAutoRender();
     \Pimcore\Logger::notice('OmniPay paymentReturn [Postfinance]. TransactionID: ' . $requestData['transaction'] . ', Status: ' . $requestData['status']);
     $redirectUrl = '';
     if ($requestData['status'] === 5) {
         if (!empty($requestData['transaction'])) {
             $cart = \CoreShop\Model\Cart::findByCustomIdentifier($requestData['transaction']);
             if ($cart instanceof \CoreShop\Model\Cart) {
                 \Pimcore\Logger::notice('OmniPay paymentReturn [Postfinance]: create order with: ' . $requestData['transaction']);
                 $order = $cart->createOrder(\CoreShop\Model\Order\State::getById(\CoreShop\Model\Configuration::get("SYSTEM.ORDERSTATE.PAYMENT")), $this->getModule(), $cart->getTotal(), $this->view->language);
                 $payments = $order->getPayments();
                 foreach ($payments as $p) {
                     $dataBrick = new \Pimcore\Model\Object\Objectbrick\Data\CoreShopPaymentOmnipay($p);
                     $dataBrick->setTransactionId($requestData['transaction']);
                     $p->save();
                 }
                 $redirectUrl = Pimcore\Tool::getHostUrl() . $this->getModule()->getConfirmationUrl($order);
             } else {
                 \Pimcore\Logger::notice('OmniPay paymentReturn [Postfinance]: Cart with identifier' . $requestData['transaction'] . 'not found');
                 $redirectUrl = Pimcore\Tool::getHostUrl() . $this->getModule()->getErrorUrl('cart with identifier' . $requestData['transaction'] . 'not found');
             }
         } else {
             \Pimcore\Logger::notice('OmniPay paymentReturn [Postfinance]: No valid transaction id given');
             $redirectUrl = Pimcore\Tool::getHostUrl() . $this->getModule()->getErrorUrl('no valid transaction id given');
         }
     } else {
         \Pimcore\Logger::notice('OmniPay paymentReturn [Postfinance]: Error Status: ' . $requestData['status']);
         $redirectUrl = Pimcore\Tool::getHostUrl() . $this->getModule()->getErrorUrl('Postfinance returned with an error. Error Status: ' . $requestData['status']);
     }
     $this->redirect($redirectUrl);
     exit;
 }
开发者ID:coreshop,项目名称:omnipay,代码行数:40,代码来源:PostfinanceController.php

示例5: checkValidity

 /**
  * @return bool
  */
 public function checkValidity()
 {
     $sane = true;
     if (is_array($this->data) && $this->data["internal"]) {
         if ($this->data["internalType"] == "document") {
             $doc = Document::getById($this->data["internalId"]);
             if (!$doc) {
                 $sane = false;
                 Logger::notice("Detected insane relation, removing reference to non existent document with id [" . $this->getDocumentId() . "]");
                 $new = Document\Tag::factory($this->getType(), $this->getName(), $this->getDocumentId());
                 $this->data = $new->getData();
             }
         } elseif ($this->data["internalType"] == "asset") {
             $asset = Asset::getById($this->data["internalId"]);
             if (!$asset) {
                 $sane = false;
                 Logger::notice("Detected insane relation, removing reference to non existent asset with id [" . $this->getDocumentId() . "]");
                 $new = Document\Tag::factory($this->getType(), $this->getName(), $this->getDocumentId());
                 $this->data = $new->getData();
             }
         }
     }
     return $sane;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:27,代码来源:Link.php


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