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


PHP EE_Error::throw_exception_if_debugging方法代碼示例

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


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

示例1: _validate_op_and_value

 /**
  * Verifies this is an array with keys 0 and 1, where key 0 is a usable
  * operator (initially just '=') and key 1 is something that can be cast to a string
  *
  * @param array $op_and_value
  * @return array
  * @throws \EE_Error
  */
 protected function _validate_op_and_value($op_and_value)
 {
     if (!isset($op_and_value[0], $op_and_value[1])) {
         EE_Error::throw_exception_if_debugging(sprintf(__('Required Validation Strategy conditions array\'s value must be an array with two elements: an operator, and a value. It didn\'t. The related input is %1$s', 'event_espresso'), $this->_input->name()), __FILE__, __FUNCTION__, __LINE__);
     }
     $operator = $op_and_value[0];
     $value = (string) $op_and_value[1];
     if ($operator !== '=') {
         EE_Error::throw_exception_if_debugging(sprintf(__('Required Validation Strategy conditions can currently only use the equals operator. If you need others, please add support for it! The related input is %1$s', 'event_espresso'), $this->_input->name()), __FILE__, __FUNCTION__, __LINE__);
     }
     return array($operator, $value);
 }
開發者ID:aaronfrey,項目名稱:PepperLillie-GSP,代碼行數:20,代碼來源:EE_Conditionally_Required_Validation_Strategy.strategy.php


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