Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Yadis

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class Services_Yadis_SessionLoader

Description

A session helper class designed to translate between arrays and

objects. Note that the class used must have a constructor that takes no parameters. This is not a general solution, but it works for dumb objects that just need to have attributes set. The idea is that you'll subclass this and override $this->check($data) -> bool to implement your own session data validation.

Located in /openid/Services/Yadis/Manager.php (line 74)

Class Services_Yadis_SessionLoader
Direct descendents
Class Description
ClassAuth_OpenID_ServiceEndpointLoader A session helper class designed to translate between arrays and
ClassServices_Yadis_ManagerLoader A session helper class designed to translate between arrays and
Method Summary
Method void check ( $data)
Method void fromSession ( $data)
Method void newObject ( $data)
Method void prepareForLoad ( $data)
Method void prepareForSave ( $obj)
Method void toSession ( $obj)
Methods
check (line 78)

Override this.

void check ( $data)
  • $data

Redefined in descendants as:
fromSession (line 91)

Given a session data value (an array), this creates an object

(returned by $this->newObject()) whose attributes and values are those in $data. Returns null if $data lacks keys found in $this->requiredKeys(). Returns null if $this->check($data) evaluates to false. Returns null if $this->newObject() evaluates to false.

void fromSession ( $data)
  • $data
newObject (line 139)

Returns a new instance of this loader's class, using the session data to construct it if necessary. The object need only be created; $this->fromSession() will take care of setting the object's attributes.

void newObject ( $data)
  • $data

Redefined in descendants as:
prepareForLoad (line 128)

Prepares the data array by making any necessary changes.

Returns an array whose keys and values will be used to update the original data array before calling $this->newObject($data).

void prepareForLoad ( $data)
  • $data

Redefined in descendants as:
prepareForSave (line 171)

Override this.

void prepareForSave ( $obj)
  • $obj

Redefined in descendants as:
toSession (line 150)

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.

void toSession ( $obj)
  • $obj

Documentation generated on Mon, 05 Mar 2007 21:10:24 +0000 by phpDocumentor 1.3.1