1 | <?php |
||
19 | class RememberMeCookie extends Base |
||
20 | { |
||
21 | /** |
||
22 | * Cookie name. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | const COOKIE_NAME = 'JM_RM'; |
||
27 | |||
28 | /** |
||
29 | * Encode the cookie. |
||
30 | * |
||
31 | * @param string $token Session token |
||
32 | * @param string $sequence Sequence token |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | public function encode($token, $sequence) |
||
40 | |||
41 | /** |
||
42 | * Decode the value of a cookie. |
||
43 | * |
||
44 | * @param string $value Raw cookie data |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | public function decode($value) |
||
57 | |||
58 | /** |
||
59 | * Return true if the current user has a RememberMe cookie. |
||
60 | * |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function hasCookie() |
||
67 | |||
68 | /** |
||
69 | * Write and encode the cookie. |
||
70 | * |
||
71 | * @param string $token Session token |
||
72 | * @param string $sequence Sequence token |
||
73 | * @param string $expiration Cookie expiration |
||
74 | * |
||
75 | * @return bool |
||
76 | */ |
||
77 | public function write($token, $sequence, $expiration) |
||
89 | |||
90 | /** |
||
91 | * Read and decode the cookie. |
||
92 | * |
||
93 | * @return mixed |
||
94 | */ |
||
95 | public function read() |
||
105 | |||
106 | /** |
||
107 | * Remove the cookie. |
||
108 | * |
||
109 | * @return bool |
||
110 | */ |
||
111 | public function remove() |
||
123 | } |
||
124 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.