Auth_Yadis_SessionLoader::toSession PHP Method

toSession() public method

Returns an array of keys and values built from the attributes of $obj. If $this->prepareForSave($obj) returns an array, its keys and values are used to update the $data array of attributes from $obj.
public toSession ( $obj )
    function toSession($obj)
    {
        $data = array();
        foreach ($obj as $k => $v) {
            $data[$k] = $v;
        }
        $extra = $this->prepareForSave($obj);
        if ($extra && is_array($extra)) {
            foreach ($extra as $k => $v) {
                $data[$k] = $v;
            }
        }
        return $data;
    }