本文整理汇总了PHP中sfForm::hasToStringException方法的典型用法代码示例。如果您正苦于以下问题:PHP sfForm::hasToStringException方法的具体用法?PHP sfForm::hasToStringException怎么用?PHP sfForm::hasToStringException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfForm
的用法示例。
在下文中一共展示了sfForm::hasToStringException方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Executes this filter.
*
* @param sfFilterChain $filterChain The filter chain.
*
* @throws <b>sfInitializeException</b> If an error occurs during view initialization
* @throws <b>sfViewException</b> If an error occurs while executing the view
*/
public function execute($filterChain)
{
// execute next filter
$filterChain->execute();
if (sfConfig::get('sf_logging_enabled')) {
$this->context->getEventDispatcher()->notify(new sfEvent($this, 'application.log', array('Render to the client')));
}
// get response object
$response = $this->context->getResponse();
// hack to rethrow sfForm __toString() exception (see sfForm)
if (sfForm::hasToStringException()) {
throw sfForm::getToStringException();
}
// send headers + content
$response->send();
}
示例2: execute
/**
* Executes this filter.
*
* @param sfFilterChain $filterChain The filter chain.
*
* @throws <b>sfInitializeException</b> If an error occurs during view initialization
* @throws <b>sfViewException</b> If an error occurs while executing the view
*/
public function execute($filterChain)
{
// execute next filter
$filterChain->execute();
// get response object
$response = $this->context->getResponse();
// hack to rethrow sfForm and|or sfFormField __toString() exceptions (see sfForm and sfFormField)
if (sfForm::hasToStringException()) {
throw sfForm::getToStringException();
} else {
if (sfFormField::hasToStringException()) {
throw sfFormField::getToStringException();
}
}
// send headers + content
$response->send();
}
示例3: execute
public function execute($filterChain)
{
$filterChain->execute();
$response = $this->context->getResponse();
if (sfForm::hasToStringException()) {
throw sfForm::getToStringException();
} else {
if (sfFormField::hasToStringException()) {
throw sfFormField::getToStringException();
}
}
if (sfView::RENDER_VAR != $this->context->getController()->getRenderMode()) {
$response->send();
}
}
示例4: execute
public function execute($filterChain)
{
$filterChain->execute();
$response = $this->context->getResponse();
if (sfForm::hasToStringException()) {
throw sfForm::getToStringException();
} else {
if (sfFormField::hasToStringException()) {
throw sfFormField::getToStringException();
}
}
$response->send();
}
示例5: execute
public function execute($filterChain)
{
$filterChain->execute();
if (sfConfig::get('sf_logging_enabled')) {
$this->context->getEventDispatcher()->notify(new sfEvent($this, 'application.log', array('Render to the client')));
}
$response = $this->context->getResponse();
if (sfForm::hasToStringException()) {
throw sfForm::getToStringException();
} else {
if (sfFormField::hasToStringException()) {
throw sfFormField::getToStringException();
}
}
$response->send();
}