blueshoes php application framework and cms            core_net
[ class tree: core_net ] [ index: core_net ] [ all elements ]

Class: Bs_SessionFile

Source Location: /core/net/http/session/Bs_SessionFile.class.php

Class Overview

Bs_Object
   |
   --Bs_Session
      |
      --Bs_SessionFile

!!! deprecated, use Bs_SimpleSession instead !!!


Author(s):

Version:

  • 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:42 $

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_Session

Bs_Session::Bs_Session()
Constructor.
Bs_Session::destroy()
kills the session and removes all stored data.
Bs_Session::gc()
Garbage collection you need to overwrite this method.
Bs_Session::getSid()
returns the session id
Bs_Session::getVar()
returns the value of a registered var.
Bs_Session::init()
inits this object. tells if we have such a session or if it needs to be created.
Bs_Session::isRegistered()
tells if a var is registered.
Bs_Session::register()
add a var to the session.
Bs_Session::setSid()
sets the session id
Bs_Session::start()
starts a new session. sends the cookie to the browser.
Bs_Session::unRegister()
remove a var from the session

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 49]
!!! deprecated, use Bs_SimpleSession instead !!!

Session Class using flat files.

NOTE: This class may become deprecated. Use instead.

example usage:

dependencies: Bs_Session, Bs_File, Bs_Dir




Tags:

pattern:  singleton: (pseudostatic)
deprecated:  use Bs_SimpleSession instead
access:  public
version:  4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:42 $
copyright:  blueshoes.org
author:  Andrej Arn <at blueshoes dot org>


[ Top ]


Class Variables

$filePrefix =  'bs_sess_'

[line 74]

the file prefix for the session file names.



Tags:

see:  var $_path
access:  public

Type:   string


[ Top ]



Class Methods


constructor Bs_SessionFile [line 84]

Bs_SessionFile Bs_SessionFile( [string $path = NULL], [int $gc = NULL], [int $ttl = 30])

Constructor.



Tags:

access:  public


Parameters:

string   $path   if given then this path wil be used to store the session files. otherwise (empty) the session.save_path from the php.ini is used.
int   $gc   the garbage collector, see $_gc
int   $ttl   the time-to-live in minutes, see $_ttl

[ Top ]

method destroy [line 144]

bool destroy( )

kills the session and removes all stored data.

the file will be removed once write() gets called. see there.




Tags:

return:  TRUE on success, FALSE on (at least part) failure.
access:  public


Overrides Bs_Session::destroy() (kills the session and removes all stored data.)

[ Top ]

method gc [line 197]

void gc( )

Garbage collection



Tags:

access:  public


Overrides Bs_Session::gc() (Garbage collection you need to overwrite this method.)

[ Top ]

method read [line 156]

bool read( )

reads (loads) an existing session.

uses parent method.




Tags:

return:  true=success false=failure
access:  public


[ Top ]

method write [line 176]

bool write( )

writes an existing session to a file.

NOTE: this method is registered to register_shutdown_function() so don't exit()/die() here. also echo() and print() are of no use. rtfm.




Tags:

return:  true=success false=failure. also returns true if we don't have to write cause nothing has changed, or if session has been destroy()ed.
see:  var $this->_hasChanged
access:  public


[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:12:36 +0100 by phpDocumentor 1.2.3