Auth_Yadis_SessionLoader Klassenreferenz

Basisklasse für Auth_OpenID_ServiceEndpointLoader und Auth_Yadis_ManagerLoader.


Öffentliche Methoden

 check ($data)
 fromSession ($data)
 prepareForLoad ($data)
 newObject ($data)
 toSession ($obj)
 prepareForSave ($obj)


Ausführliche Beschreibung

Definiert in Zeile 76 der Datei Manager.php.


Dokumentation der Elementfunktionen

check ( data  ) 

Override this.

private

Erneute Implementation in Auth_OpenID_ServiceEndpointLoader und Auth_Yadis_ManagerLoader.

Definiert in Zeile 82 der Datei Manager.php.

00083     {
00084         return true;
00085     }

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

Definiert in Zeile 97 der Datei Manager.php.

00098     {
00099         if (!$data) {
00100             return null;
00101         }
00102 
00103         $required = $this->requiredKeys();
00104 
00105         foreach ($required as $k) {
00106             if (!array_key_exists($k, $data)) {
00107                 return null;
00108             }
00109         }
00110 
00111         if (!$this->check($data)) {
00112             return null;
00113         }
00114 
00115         $data = array_merge($data, $this->prepareForLoad($data));
00116         $obj = $this->newObject($data);
00117 
00118         if (!$obj) {
00119             return null;
00120         }
00121 
00122         foreach ($required as $k) {
00123             $obj->$k = $data[$k];
00124         }
00125 
00126         return $obj;
00127     }

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

Erneute Implementation in Auth_OpenID_ServiceEndpointLoader und Auth_Yadis_ManagerLoader.

Definiert in Zeile 149 der Datei Manager.php.

00150     {
00151         return null;
00152     }

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

Erneute Implementation in Auth_Yadis_ManagerLoader.

Definiert in Zeile 136 der Datei Manager.php.

00137     {
00138         return array();
00139     }

prepareForSave ( obj  ) 

Override this.

private

Erneute Implementation in Auth_Yadis_ManagerLoader.

Definiert in Zeile 185 der Datei Manager.php.

00186     {
00187         return array();
00188     }

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

Definiert in Zeile 162 der Datei Manager.php.

00163     {
00164         $data = array();
00165         foreach ($obj as $k => $v) {
00166             $data[$k] = $v;
00167         }
00168 
00169         $extra = $this->prepareForSave($obj);
00170 
00171         if ($extra && is_array($extra)) {
00172             foreach ($extra as $k => $v) {
00173                 $data[$k] = $v;
00174             }
00175         }
00176 
00177         return $data;
00178     }


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved.
MyOOS [Shopsystem] is Free Software released under the GNU/GPL License.

Webmaster: info@r23.de (Impressum)
doxygen