ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
Auth_Yadis_Manager Class Reference
+ Collaboration diagram for Auth_Yadis_Manager:

Public Member Functions

 Auth_Yadis_Manager ($starting_url, $yadis_url, $services, $session_key)
 Intialize a new yadis service manager. More...
 
 length ()
 private More...
 
 nextService ()
 Return the next service. More...
 
 current ()
 private More...
 
 forURL ($url)
 private More...
 
 started ()
 private More...
 

Detailed Description

Definition at line 276 of file Manager.php.

Member Function Documentation

◆ Auth_Yadis_Manager()

Auth_Yadis_Manager::Auth_Yadis_Manager (   $starting_url,
  $yadis_url,
  $services,
  $session_key 
)

Intialize a new yadis service manager.

private

Definition at line 283 of file Manager.php.

285  {
286  // The URL that was used to initiate the Yadis protocol
287  $this->starting_url = $starting_url;
288 
289  // The URL after following redirects (the identifier)
290  $this->yadis_url = $yadis_url;
291 
292  // List of service elements
293  $this->services = $services;
294 
295  $this->session_key = $session_key;
296 
297  // Reference to the current service object
298  $this->_current = null;
299 
300  // Stale flag for cleanup if PHP lib has trouble.
301  $this->stale = false;
302  }

◆ current()

Auth_Yadis_Manager::current ( )

private

Definition at line 334 of file Manager.php.

335  {
336  // Return the current service.
337  // Returns None if there are no services left.
338  return $this->_current;
339  }

◆ forURL()

Auth_Yadis_Manager::forURL (   $url)

private

Definition at line 344 of file Manager.php.

345  {
346  return in_array($url, array($this->starting_url, $this->yadis_url));
347  }

◆ length()

Auth_Yadis_Manager::length ( )

private

Definition at line 307 of file Manager.php.

308  {
309  // How many untried services remain?
310  return count($this->services);
311  }

◆ nextService()

Auth_Yadis_Manager::nextService ( )

Return the next service.

$this->current() will continue to return that service until the next call to this method.

Definition at line 319 of file Manager.php.

320  {
321 
322  if ($this->services) {
323  $this->_current = array_shift($this->services);
324  } else {
325  $this->_current = null;
326  }
327 
328  return $this->_current;
329  }

◆ started()

Auth_Yadis_Manager::started ( )

private

Definition at line 352 of file Manager.php.

353  {
354  // Has the first service been returned?
355  return $this->_current !== null;
356  }

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