[ci skip] feature/session (#3073): Add missing method docblocks
diff --git a/system/libraries/Session/drivers/Session_memcached_driver.php b/system/libraries/Session/drivers/Session_memcached_driver.php
index e2b568f..683bb5c 100644
--- a/system/libraries/Session/drivers/Session_memcached_driver.php
+++ b/system/libraries/Session/drivers/Session_memcached_driver.php
@@ -94,6 +94,15 @@
// ------------------------------------------------------------------------
+ /**
+ * Open
+ *
+ * Sanitizes save_path and initializes connections.
+ *
+ * @param string $save_path Server path(s)
+ * @param string $name Session cookie name, unused
+ * @return bool
+ */
public function open($save_path, $name)
{
$this->_memcached = new Memcached();
@@ -141,6 +150,14 @@
// ------------------------------------------------------------------------
+ /**
+ * Read
+ *
+ * Reads session data and acquires a lock
+ *
+ * @param string $session_id Session ID
+ * @return string Serialized session data
+ */
public function read($session_id)
{
if (isset($this->_memcached) && $this->_get_lock($session_id))
@@ -156,6 +173,17 @@
return FALSE;
}
+ // ------------------------------------------------------------------------
+
+ /**
+ * Write
+ *
+ * Writes (create / update) session data
+ *
+ * @param string $session_id Session ID
+ * @param string $session_data Serialized session data
+ * @return bool
+ */
public function write($session_id, $session_data)
{
if ( ! isset($this->_memcached))
@@ -196,6 +224,13 @@
// ------------------------------------------------------------------------
+ /**
+ * Close
+ *
+ * Releases locks and closes connection.
+ *
+ * @return void
+ */
public function close()
{
if (isset($this->_memcached))
@@ -215,6 +250,14 @@
// ------------------------------------------------------------------------
+ /**
+ * Destroy
+ *
+ * Destroys the current session.
+ *
+ * @param string $session_id Session ID
+ * @return bool
+ */
public function destroy($session_id)
{
if (isset($this->_memcached, $this->_lock_key))
@@ -228,6 +271,14 @@
// ------------------------------------------------------------------------
+ /**
+ * Garbage Collector
+ *
+ * Deletes expired sessions
+ *
+ * @param int $maxlifetime Maximum lifetime of sessions
+ * @return bool
+ */
public function gc($maxlifetime)
{
// Not necessary, Memcached takes care of that.
@@ -236,6 +287,14 @@
// ------------------------------------------------------------------------
+ /**
+ * Get lock
+ *
+ * Acquires an (emulated) lock.
+ *
+ * @param string $session_id Session ID
+ * @return bool
+ */
protected function _get_lock($session_id)
{
if (isset($this->_lock_key))
@@ -289,6 +348,13 @@
// ------------------------------------------------------------------------
+ /**
+ * Release lock
+ *
+ * Releases a previously acquired lock
+ *
+ * @return bool
+ */
protected function _release_lock()
{
if (isset($this->_memcached, $this->_lock_key) && $this->_lock)