1 | <?php |
||
41 | class Session |
||
42 | { |
||
43 | /** |
||
44 | * The session singleton instance for the request. |
||
45 | * |
||
46 | * @var Payload |
||
47 | */ |
||
48 | public static $instance; |
||
49 | |||
50 | /** |
||
51 | * The string name of the CSRF token stored in the session. |
||
52 | * |
||
53 | * @var string |
||
54 | */ |
||
55 | const CSRF = 'csrf_token'; |
||
56 | |||
57 | /** |
||
58 | * Create the session payload and load the session. |
||
59 | * |
||
60 | * @return void |
||
61 | */ |
||
62 | public static function load() |
||
70 | |||
71 | /** |
||
72 | * Create the session payload instance for the request. |
||
73 | * |
||
74 | * @param string $storage |
||
75 | * |
||
76 | * @return void |
||
77 | */ |
||
78 | public static function start($storage) |
||
82 | |||
83 | /** |
||
84 | * Create a new session storage instance. |
||
85 | * |
||
86 | * @param string $storage |
||
87 | * |
||
88 | * @return Storage\Storage |
||
89 | * @throws \RuntimeException |
||
90 | */ |
||
91 | public static function factory($storage) |
||
122 | |||
123 | /** |
||
124 | * Retrieve the active session payload instance for the request. |
||
125 | * |
||
126 | * @return Payload |
||
127 | * @throws \RuntimeException |
||
128 | */ |
||
129 | public static function instance() |
||
137 | |||
138 | /** |
||
139 | * Determine if session handling has been started for the request. |
||
140 | * |
||
141 | * @return bool |
||
142 | */ |
||
143 | public static function started() |
||
147 | |||
148 | /** |
||
149 | * Magic Method for calling the methods on the session singleton instance. |
||
150 | * |
||
151 | * @param $method |
||
152 | * @param $parameters |
||
153 | * |
||
154 | * @return mixed |
||
155 | */ |
||
156 | public static function __callStatic($method, $parameters) |
||
162 | } |
||
163 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.