Class Scenario_Identity

Description

Identity object

Object to be passed to functions requiring an identity for the current case. Subclasses may return different values for database-safe identities.

  • copyright: Copyright (c) 2010 TK Studios. (http://www.tkstudios.com)
  • license: New BSD License

Located in /Scenario/Identity.php (line 33)


	
			
Variable Summary
string $_identStr
Method Summary
static Scenario_Identity getIdentity ([array $params = array()])
static void setProvider ([Scenario_Identity_Provider $provider = null])
Scenario_Identity __construct ( $ident)
string getDbIdent ()
mixed getIdent ()
void setDbIdent (string $str)
void setIdent (mixed $id)
Variables
string $_identStr (line 88)

Identifying string

  • access: protected
Methods
static method getIdentity (line 75)

Returns an identity object via the current default provider.

  • return: Identity generated by the current static identity provider.
  • access: public
static Scenario_Identity getIdentity ([array $params = array()])
  • array $params: (Optional) Parameters to pass to the identity provider.
static method getProvider (line 64)

Returns the currently set default identity provider.

  • return: Currently set default identity provider.
  • access: public
static Scenario_Identity_Provider getProvider ()
static method setProvider (line 49)

Sets the default identity provider to be used when no identity is provided.

  • access: public
static void setProvider ([Scenario_Identity_Provider $provider = null])
Constructor __construct (line 90)
  • access: public
Scenario_Identity __construct ( $ident)
  • $ident
getDbIdent (line 103)

Get database-safe version of identity string.

Fetch an identity string that can be used in data storage as a unique identifier. Inheriting Scenario_Identity would allow you to, for example, use session_(ID) or user_(id) depending on the situation.

  • access: public
string getDbIdent ()
getIdent (line 127)

Retrieves the normal identifier object.

Returns an identifying variable or object. Not necessarily the same as the DB Ident. In the case of the base Scenario_Identity object, this should be a string.

  • access: public
mixed getIdent ()
setDbIdent (line 115)

Set the database identifier.

Alter the unique data storage identifier. Useful if, for example, a user logs in or out. In the base Scenario_Identity class, this is equivalent to setIdent($str)

  • access: public
void setDbIdent (string $str)
  • string $str: New identifier string.
setIdent (line 139)

Sets the normal identifier object.

Set the identifying var/object. Not necessarily the same as the DB Ident. In the case of the base Scenario_Identity object, this should be a string.

  • access: public
void setIdent (mixed $id)
  • mixed $id

Documentation generated on Sat, 23 Oct 2010 18:10:46 -0400 by phpDocumentor 1.4.3