Może dobrym pomysłem byłoby poprostu sprawdzanie w każdej akcji osobno czy ma odpowiednie parametry
Możesz dla każdej akcji zrobić "rodzica" który miałby, coś takiego (pomysł zaczerpnięty z Zend_Config):
<?php
1: class Zend_Config implements Countable, Iterator
2: {
3:
4: protected $_allowModifications;
5: protected $_iterationPointerValid;
6: protected $_data;
7:
8: public function __construct($array, $allowModifications = false)
9: {
10: $this->_allowModifications = $allowModifications;
11: foreach ($array as $key => $value) {
12: if ($this->_isValidKeyName($key)) {
14: $this->_data[$key] = new Zend_Config($value, $allowModifications);
15: } else {
16: $this->_data[$key] = $value;
17: }
18: } else {
19: throw new Zend_Config_Exception("Invalid key: $key");
20: }
21: }
22: }
23:
24: public function __get($name)
25: {
26: $result = null;
27
: if (isset($this->_data
[$name])) {28: $result = $this->_data[$name];
29: }
30: return $result;
31: }
32:
33: public function __set($name, $value)
34: {
35: if ($this->_allowModifications) {
37: $this->_data[$name] = new Zend_Config($value, true);
38: } else {
39: $this->_data[$name] = $value;
40: }
41: } else {
42: throw new Zend_Config_Exception('Zend_Config is read only');
43: }
44: }
45: }
?>
potem sprawdzasz, w pliku konkretnej akcji:
<?php
class Error403Action extends Zend_Config //oczywiście u Ciebie Class Error403Action extends Action
{
public __construct()
{
if (!isset($this->twojparamter)) throw
new NoParamActionExeption
(); }
}
?>
Oczywiście we FrontControlerze łapiesz NoParamActionException i kierujesz usera na odpowiednią stronę.