PGメモ

非エンジニアの記録

::execute() must be compatible with that of sfComponent::execute() in の対処法

symfony1.1以上でactionsが長くなってきたので分けたいと思ったので分けてみた。すると

hogeAction::execute() must be compatible with that of sfComponent::execute() in

というのが出た。

hogeAction extends sfActions
{
  public function execute()
  {
  }
}

こう書いているのがだめらしい。正しくは

hogeAction extends sfActions
{
  public function execute($request)
  {
  }
}

sfWebrequest $requestではだめ。$requestのみ。
sfComponentが$requestだけなので。