Skip to content

Instantly share code, notes, and snippets.

@handlename
Created September 21, 2010 10:51
Show Gist options
  • Save handlename/589533 to your computer and use it in GitHub Desktop.
Save handlename/589533 to your computer and use it in GitHub Desktop.
<?php
class kayacActions extends sfActions
{
public function executeError(sfWebRequest $request)
{
// 問答無用でエラーレスポンス
$this->forwardError('500', 'エラーメッセージ');
}
public function executeErrorIf(sfWebRequest $request)
{
// 条件が真ならエラーレスポンス
$this->forwardError(true, '500', 'エラーメッセージ');
}
public function executeError(sfWebRequest $request)
{
// 条件が偽ならエラーレスポンス
$this->forwardError(false, '500', 'エラーメッセージ');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment