Kod
$this->forward404($message);
i teraz moje pytanie czy owe $message moze byc gdziekolwiek i jakkolwiek wywolane?
Troche mi sie nie widzi wyswietlac taka sama strone e404 dla wszystkich akcji, przydloby sie cos w stylu: Product not found/Article not found etc.
Z tego co przejzalem kod sf to:
Kod
forward404() wywoluje sfError404Exception
class sfError404Exception extends sfException
{
public function __construct($message = null, $code = 0)
{
$this->setName('sfError404Exception');
parent::__construct($message, $code);
}
public function printStackTrace($exception = null)
{
sfContext::getInstance()->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action'));
}
}
class sfError404Exception extends sfException
{
public function __construct($message = null, $code = 0)
{
$this->setName('sfError404Exception');
parent::__construct($message, $code);
}
public function printStackTrace($exception = null)
{
sfContext::getInstance()->getController()->forward(sfConfig::get('sf_error_404_module'), sfConfig::get('sf_error_404_action'));
}
}
czyli tylko wywolanie akcji bez $message.
Jakies pomysly jak przekazac i wyswietlic owe $message ?