1 | <?php |
||
14 | class ParameterConfirmationToken extends AbstractConfirmationToken { |
||
15 | |||
16 | /** |
||
17 | * The name of the parameter |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $parameterName = null; |
||
22 | |||
23 | /** |
||
24 | * The parameter given |
||
25 | * |
||
26 | * @var string|null The string value, or null if not provided |
||
27 | */ |
||
28 | protected $parameter = null; |
||
29 | |||
30 | /** |
||
31 | * Create a new ParameterConfirmationToken |
||
32 | * |
||
33 | * @param string $parameterName Name of the querystring parameter to check |
||
34 | */ |
||
35 | public function __construct($parameterName) { |
||
48 | |||
49 | /** |
||
50 | * Get the name of this token |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getName() { |
||
57 | |||
58 | public function parameterProvided() { |
||
61 | |||
62 | public function reloadRequired() { |
||
65 | |||
66 | public function suppress() { |
||
69 | |||
70 | public function params($includeToken = true) { |
||
79 | |||
80 | public function getRedirectUrlBase() { |
||
83 | |||
84 | public function getRedirectUrlParams() { |
||
95 | |||
96 | protected function redirectURL() { |
||
100 | } |
||
101 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.