crit() public method

This method allows to have an easy ZF compatibility.
public crit ( string $message, array $context = [] ) : boolean
$message string The log message
$context array The log context
return boolean Whether the record has been processed
コード例 #1
0
ファイル: LosSync.php プロジェクト: eric19h/turbulent-wookie
 /**
  * 
  * @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;
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
ファイル: MonologAdapter.php プロジェクト: 360i/sonno
 /**
  * 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);
 }
コード例 #4
0
ファイル: LoggerProxy.php プロジェクト: akentner/incoming-ftp
 /**
  * @param string $message
  * @param array $context
  * @return bool
  */
 public function crit($message, array $context = array())
 {
     return parent::crit($message, $context);
 }