Provides support for session storage using a MySQL brand database.
Method Summary
-
string
db_escape($string)
Escapes a string before using it in a query statement
-
array
db_fetch_row($result)
Extracts a row from a query result set
-
int
db_num_rows($result)
Counts the rows in a query result
-
mixed
db_query($query)
Executes an SQL Query
-
bool
sessionDestroy($id)
Destroys a session.
-
bool
sessionGC($lifetime)
Cleans up old sessions.
-
string
sessionRead($id)
Reads a session.
-
bool
sessionWrite($id, $data)
Writes session data.
initialize , regenerate , sessionClose , sessionDestroy , sessionGC , sessionOpen , sessionRead , sessionWrite , shutdown
initialize , read , regenerate , remove , shutdown , write
Methods inherited from sfStorage
getOptions , initialize , read , regenerate , remove , shutdown , write , __construct
Method Details
-
(string) db_escape ($string)
Browse code
| $string |
The string to escape
|
Escapes a string before using it in a query statement
returns The escaped string
-
(array) db_fetch_row ($result)
Browse code
| $result |
Result of a query
|
Extracts a row from a query result set
returns Extracted row as an indexed array
-
(int) db_num_rows ($result)
Browse code
| $result |
Result of a query
|
Counts the rows in a query result
returns Number of rows
-
(mixed) db_query ($query)
Browse code
| $query |
The query to execute
|
Executes an SQL Query
returns The result of the query
-
(bool) sessionDestroy ($id)
Browse code
Destroys a session.
returns true, if the session was destroyed, otherwise an exception is thrown
throws sfDatabaseException If the session cannot be destroyed.
-
(bool) sessionGC ($lifetime)
Browse code
| $lifetime |
The lifetime of a session
|
Cleans up old sessions.
returns true, if old sessions have been cleaned, otherwise an exception is thrown
throws sfDatabaseException If any old sessions cannot be cleaned
-
(string) sessionRead ($id)
Browse code
Reads a session.
returns The session data if the session was read or created, otherwise an exception is thrown
throws sfDatabaseException If the session cannot be read
-
(bool) sessionWrite ($id, $data)
Browse code
| $id |
A session ID
|
| $data |
A serialized chunk of session data
|
Writes session data.
returns true, if the session was written, otherwise an exception is thrown
throws sfDatabaseException If the session data cannot be written
|