|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| SimpleCookieJar () | |
| restartSession ($date=false) | |
| agePrematurely ($interval) | |
| setCookie ($name, $value, $host=false, $path= '/', $expiry=false) | |
| _findFirstMatch ($cookie) | |
| getCookieValue ($host, $path, $name) | |
| _isMatch ($cookie, $host, $path, $name) | |
| selectAsPairs ($url) | |
Data Fields | |
| $_cookies | |
Definition at line 228 of file cookies.php.
| _findFirstMatch | ( | $ | cookie | ) |
Finds a matching cookie to write over or the first empty slot if none.
| SimpleCookie | $cookie | Cookie to write into jar. |
Definition at line 301 of file cookies.php.


| _isMatch | ( | $ | cookie, |
| $ | host, | ||
| $ | path, | ||
| $ | name | ||
| ) |
Tests cookie for matching against search criteria.
| SimpleTest | $cookie | Cookie to test. |
| string | $host | Host must match. |
| string | $path | Cookie path must be shorter than this path. |
| string | $name | Name must match. |
Definition at line 350 of file cookies.php.

| agePrematurely | ( | $ | interval | ) |
Ages all cookies in the cookie jar.
| integer | $interval | The old session is moved into the past by this number of seconds. Cookies now over age will be removed. public |
Definition at line 270 of file cookies.php.
| getCookieValue | ( | $ | host, |
| $ | path, | ||
| $ | name | ||
| ) |
Reads the most specific cookie value from the browser cookies. Looks for the longest path that matches.
| string | $host | Host to search. |
| string | $path | Applicable path. |
| string | $name | Name of cookie to read. |
Definition at line 326 of file cookies.php.

| restartSession | ( | $ | date = false | ) |
Removes expired and temporary cookies as if the browser was closed and re-opened.
| string/integer | $now Time to test expiry against. public |
Definition at line 245 of file cookies.php.
| selectAsPairs | ( | $ | url | ) |
Uses a URL to sift relevant cookies by host and path. Results are list of strings of form "name=value".
| SimpleUrl | $url | Url to select by. |
Definition at line 370 of file cookies.php.

| setCookie | ( | $ | name, |
| $ | value, | ||
| $ | host = false, |
||
| $ | path = '/', |
||
| $ | expiry = false |
||
| ) |
Sets an additional cookie. If a cookie has the same name and path it is replaced.
| string | $name | Cookie key. |
| string | $value | Value of cookie. |
| string | $host | Host upon which the cookie is valid. |
| string | $path | Cookie path if not host wide. |
| string | $expiry | Expiry date. public |
Definition at line 286 of file cookies.php.

| SimpleCookieJar | ( | ) |
Constructor. Jar starts empty. public
Definition at line 235 of file cookies.php.
| $_cookies |
Definition at line 229 of file cookies.php.