ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_Yadis_SessionLoader Class Reference
+ Inheritance diagram for Auth_Yadis_SessionLoader:
+ Collaboration diagram for Auth_Yadis_SessionLoader:

Public Member Functions

 check ($data)
 Override this.
 fromSession ($data)
 Given a session data value (an array), this creates an object (returned by $this->newObject()) whose attributes and values are those in $data.
 prepareForLoad ($data)
 Prepares the data array by making any necessary changes.
 newObject ($data)
 Returns a new instance of this loader's class, using the session data to construct it if necessary.
 toSession ($obj)
 Returns an array of keys and values built from the attributes of $obj.
 prepareForSave ($obj)
 Override this.

Detailed Description

Definition at line 76 of file Manager.php.

Member Function Documentation

Auth_Yadis_SessionLoader::check (   $data)

Override this.

private

Reimplemented in Auth_Yadis_ManagerLoader, and Auth_OpenID_ServiceEndpointLoader.

Definition at line 82 of file Manager.php.

Referenced by fromSession().

{
return true;
}

+ Here is the caller graph for this function:

Auth_Yadis_SessionLoader::fromSession (   $data)

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.

private

Definition at line 97 of file Manager.php.

References $data, check(), newObject(), and prepareForLoad().

{
if (!$data) {
return null;
}
$required = $this->requiredKeys();
foreach ($required as $k) {
if (!array_key_exists($k, $data)) {
return null;
}
}
if (!$this->check($data)) {
return null;
}
$data = array_merge($data, $this->prepareForLoad($data));
$obj = $this->newObject($data);
if (!$obj) {
return null;
}
foreach ($required as $k) {
$obj->$k = $data[$k];
}
return $obj;
}

+ Here is the call graph for this function:

Auth_Yadis_SessionLoader::newObject (   $data)

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.

private

Reimplemented in Auth_Yadis_ManagerLoader, and Auth_OpenID_ServiceEndpointLoader.

Definition at line 149 of file Manager.php.

Referenced by fromSession().

{
return null;
}

+ Here is the caller graph for this function:

Auth_Yadis_SessionLoader::prepareForLoad (   $data)

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).

private

Reimplemented in Auth_Yadis_ManagerLoader.

Definition at line 136 of file Manager.php.

Referenced by fromSession().

{
return array();
}

+ Here is the caller graph for this function:

Auth_Yadis_SessionLoader::prepareForSave (   $obj)

Override this.

private

Reimplemented in Auth_Yadis_ManagerLoader.

Definition at line 185 of file Manager.php.

Referenced by toSession().

{
return array();
}

+ Here is the caller graph for this function:

Auth_Yadis_SessionLoader::toSession (   $obj)

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.

private

Definition at line 162 of file Manager.php.

References $data, and prepareForSave().

{
$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;
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: