本文整理汇总了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