本文整理汇总了PHP中sfForm::toStringException方法的典型用法代码示例。如果您正苦于以下问题:PHP sfForm::toStringException方法的具体用法?PHP sfForm::toStringException怎么用?PHP sfForm::toStringException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfForm
的用法示例。
在下文中一共展示了sfForm::toStringException方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setToStringException
/**
* Sets an exception thrown by the __toString() method.
*
* This is a hack needed because PHP does not allow to throw exceptions in __toString() magic method.
*
* @param Exception $e The exception thrown by __toString()
*/
public static function setToStringException(Exception $e)
{
if (null === self::$toStringException) {
self::$toStringException = $e;
}
}
示例2: setToStringException
/**
* Sets an exception thrown by the __toString() method.
*
* This is a hack needed because PHP does not allow to throw exceptions in __toString() magic method.
*
* @param Exception $e The exception thrown by __toString()
*/
public static function setToStringException(Exception $e)
{
if (is_null(self::$toStringException)) {
self::$toStringException = $e;
}
}