The Yaf_Session class

Introduction

Yaf_Session is a namespaced wrapper around PHP's native session support. It is accessed as a singleton through Yaf_Session::getInstance and works directly on $_SESSION: session data written through one interface is visible in the other.

Session entries can be accessed and manipulated through property syntax, method calls ( Yaf_Session::get, Yaf_Session::set, Yaf_Session::del, Yaf_Session::has), array access (ArrayAccess), iteration (Iterator) and count().

Class synopsis

Yaf_Session
class Yaf_Session implements Iterator, ArrayAccess, Countable {
/* Properties */
protected static $_instance;
protected $_session;
protected $_started;
/* Methods */
private __construct()
public int count()
public mixed current()
public bool del(string $name)
public mixed get(string $name = NULL)
public static Yaf_Session getInstance()
public bool has(string $name)
public bool __isset(string $name)
public mixed key()
public void next()
public bool offsetExists(mixed $name)
public mixed offsetGet(mixed $name)
public void offsetSet(mixed $name, mixed $value)
public void offsetUnset(mixed $name)
public void rewind()
public bool set(string $name, mixed $value)
public Yaf_Session start()
public void __unset(string $name)
public bool valid()
}

Properties

_instance

_session

_started

Table of Contents