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


PHP IntlGlobals::getErrorMessage方法代碼示例

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


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

示例1: parse

 /**
  * Parse string to a timestamp value.
  *
  * @param string $value    String to convert to a time value
  * @param int    $position Not supported. Position at which to start the parsing in $value (zero-based).
  *                         If no error occurs before $value is consumed, $parse_pos will
  *                         contain -1 otherwise it will contain the position at which parsing
  *                         ended. If $parse_pos > strlen($value), the parse fails immediately.
  *
  * @return string Parsed value as a timestamp
  *
  * @see http://www.php.net/manual/en/intldateformatter.parse.php
  *
  * @throws MethodArgumentNotImplementedException When $position different than null, behavior not implemented
  */
 public function parse($value, &$position = null)
 {
     // We don't calculate the position when parsing the value
     if (null !== $position) {
         throw new MethodArgumentNotImplementedException(__METHOD__, 'position');
     }
     $dateTime = $this->createDateTime(0);
     $transformer = new FullTransformer($this->getPattern(), $this->getTimeZoneId());
     $timestamp = $transformer->parse($dateTime, $value);
     // behave like the intl extension. FullTransformer::parse() set the proper error
     $this->errorCode = IntlGlobals::getErrorCode();
     $this->errorMessage = IntlGlobals::getErrorMessage();
     return $timestamp;
 }
開發者ID:tahermarkos,項目名稱:Transport,代碼行數:29,代碼來源:IntlDateFormatter.php

示例2: getIntlErrorMessage

 protected function getIntlErrorMessage()
 {
     return IntlGlobals::getErrorMessage();
 }
開發者ID:lamzin-andrey,項目名稱:skyengtt.loc,代碼行數:4,代碼來源:IntlDateFormatterTest.php

示例3: resetError

 /**
  * Set the error to the default U_ZERO_ERROR.
  */
 protected function resetError()
 {
     IntlGlobals::setError(IntlGlobals::U_ZERO_ERROR);
     $this->errorCode = IntlGlobals::getErrorCode();
     $this->errorMessage = IntlGlobals::getErrorMessage();
 }
開發者ID:nuwe1,項目名稱:symfony,代碼行數:9,代碼來源:NumberFormatter.php

示例4:

 /**
  * Stub implementation for the {@link intl_get_error_code()} function of the
  * intl extension.
  *
  * @author Bernhard Schussek <bschussek@gmail.com>
  *
  * @return bool The error message of the last intl function call or
  *              "U_ZERO_ERROR" if no error occurred.
  *
  * @see IntlGlobals::getErrorMessage()
  */
 function intl_get_error_message()
 {
     return IntlGlobals::getErrorMessage();
 }
開發者ID:BusinessCookies,項目名稱:CoffeeMachineProject,代碼行數:15,代碼來源:functions.php


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