當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Logger::crit方法代碼示例

本文整理匯總了PHP中Monolog\Logger::crit方法的典型用法代碼示例。如果您正苦於以下問題:PHP Logger::crit方法的具體用法?PHP Logger::crit怎麽用?PHP Logger::crit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Monolog\Logger的用法示例。


在下文中一共展示了Logger::crit方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addProspects

 /**
  * 
  * @param LoanApplication $application
  */
 public function addProspects(LoanApplication $application)
 {
     $response = null;
     try {
         $borrowers = array($application->getBorrower());
         foreach ($application->getCoBorrower() as $coBorrower) {
             array_push($borrowers, $coBorrower);
         }
         // prepare borrowers
         $prospects = array();
         foreach ($borrowers as $borrower) {
             $married = false;
             if ($borrower->getMaritalStatus() == 0) {
                 $married = true;
             }
             $prospect = array('id' => $borrower->getId(), 'firstName' => $borrower->getFirstName(), 'lastName' => $borrower->getLastName(), 'email' => $borrower->getEmail(), 'primaryPhone' => $borrower->getPhoneHome(), 'suffix' => $borrower->getSuffix(), 'middleInitial' => $borrower->getMiddleInitial(), 'ssn' => $borrower->getSsn(), 'married' => $married, 'birthDate' => $borrower->getBirthDate()->format($this::SERVICE_DATE_FORMAT), 'homeAddress' => array('street1' => $borrower->getLocation()->getLocation()->getAddress1(), 'street2' => $borrower->getLocation()->getLocation()->getAddress2(), 'city' => $borrower->getLocation()->getLocation()->getCity(), 'state' => $borrower->getLocation()->getLocation()->getState()->getName(), 'stateAbbreviation' => $borrower->getLocation()->getLocation()->getState()->getAbbreviation(), 'zipcode' => $borrower->getLocation()->getLocation()->getZipcode()));
             array_push($prospects, $prospect);
         }
         $paramLoanOfficer = null;
         $loanOfficer = $application->getLoanOfficer();
         if (isset($loanOfficer)) {
             $loanOfficerLosId = $loanOfficer->getLosId();
             if (isset($loanOfficerLosId)) {
                 $paramLoanOfficer['username'] = $loanOfficerLosId;
             }
         }
         $params = array('user' => $this->user, 'prospects' => $prospects, 'loanOfficer' => $paramLoanOfficer);
         $response = $this->request('createProspect', $params);
         // update the los ids
         if ($response['result']['success']) {
             foreach ($response['result']['prospects'] as $p) {
                 $borrower = $this->em->getRepository('SudouxMortgageBundle:Borrower')->find($p['id']);
                 $borrower->setLosId($p['losID']);
                 $this->em->persist($borrower);
             }
             $this->em->flush();
         }
     } catch (\Exception $e) {
         $this->logger->crit($e->getMessage());
     }
     return $response;
 }
開發者ID:eric19h,項目名稱:turbulent-wookie,代碼行數:46,代碼來源:LosSync.php

示例2: crit

 /**
  * Adds a log record at the CRITICAL level.
  * 
  * This method allows for compatibility with common interfaces.
  *
  * @param string $message The log message
  * @param array $context The log context
  * @return Boolean Whether the record has been processed
  * @static 
  */
 public static function crit($message, $context = array())
 {
     return \Monolog\Logger::crit($message, $context);
 }
開發者ID:samcrosoft,項目名稱:MicroTranslate,代碼行數:14,代碼來源:lumen_ide_helper.php

示例3: crit

 /**
  * Adds a log record at the CRITICAL level.
  *
  * @param string $message The log message
  * @param array $context The log context
  * @return Boolean Whether the record has been processed
  */
 public function crit($message, array $context = array())
 {
     return $this->_logger->crit($message, $context);
 }
開發者ID:360i,項目名稱:sonno,代碼行數:11,代碼來源:MonologAdapter.php

示例4: crit

 /**
  * @param string $message
  * @param array $context
  * @return bool
  */
 public function crit($message, array $context = array())
 {
     return parent::crit($message, $context);
 }
開發者ID:akentner,項目名稱:incoming-ftp,代碼行數:9,代碼來源:LoggerProxy.php


注:本文中的Monolog\Logger::crit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。