YahooSession Class Reference

Defines a session between an application and the Yahoo! platform. More...

List of all members.

Public Member Functions

 getSessionedUser ()
 getOwner ()
 getUser ($guid)
 clearSession ()
 hasSession ($consumerKey, $consumerSecret, $applicationId=NULL)
 requireSession ($consumerKey, $consumerSecret, $applicationId=NULL, $callback=NULL)
 query ($yql)


Detailed Description

Defines a session between an application and the Yahoo! platform.


Member Function Documentation

YahooSession::getSessionedUser (  ) 

Gets the currently sessioned user.

Returns:
YahooUser The currently sessioned YahooUser.

YahooSession::getOwner (  ) 

Gets the user who owns the application install. Only valid when viewed in YAP, otherwise will default to the logged-in user.

Returns:
YahooUser The currently sessioned YahooUser.

YahooSession::getUser ( guid  ) 

Gets the user indicated by the GUID given.

Parameters:
$guid The GUID of the user to get.
Returns:
YahooUser The user indicated by the GUID given.

YahooSession::clearSession (  ) 

Destroys the current session, effectively logging out the current user.

YahooSession::hasSession ( consumerKey,
consumerSecret,
applicationId = NULL 
)

Checks to see if there is a session in this PHP page request. Doesn't cause any redirects for the user to log in, for that you should call requireSession().

YahooSession::requireSession ( consumerKey,
consumerSecret,
applicationId = NULL,
callback = NULL 
)

Requires that there be a session in this PHP page request. Generates a redirect for the user to log in, if necessary. You must call requireSession() before any data is sent back to the user in order for the redirect to work.

Parameters:
$consumerKey The OAuth consumer key.
$consumerSecret The OAuth consumer key secret.
$applicationId The application ID, optional.
$callback The callback URL to redirect the user to after they verify the application access.
Returns:
YahooSession The current session or NULL if a session cannot be established.

YahooSession::query ( yql  ) 

Executes the given YQL query.

Parameters:
$yql The query to execute.
Returns:
The response or NULL if the request fails..


The documentation for this class was generated from the following file:
Generated on Thu Nov 20 12:23:17 2008 for Yahoo! OS SDK - PHP by  doxygen 1.5.2