Source for file YahooSessionStore.inc

Documentation is available at YahooSessionStore.inc

  1. <?php
  2.  
  3. /**
  4.  *  YOS PHP SDK for accessing social and data apis at Yahoo!
  5.  *
  6.  *  YahooSessionStore provides an interface for implementing session storage backends.
  7.  *
  8.  *  @package     yos-social-php
  9.  *  @author      Yahoo! Developer Network
  10.  *  @example     http://developer.yahoo.com/social/sdk/php/
  11.  *
  12.  *  @copyright   Copyright (c) 2009 Yahoo! Inc. All rights reserved.
  13.  *  @license     BSD License (http://www.opensource.org/licenses/bsd-license.php)
  14.  *
  15.  *   The copyrights embodied in the content of this file are licensed under the
  16.  *   BSD (revised) open source license.
  17.  *
  18.  *   Redistribution and use of this software in source and binary forms, with
  19.  *   or without modification, are permitted provided that the following
  20.  *   conditions are met:
  21.  *
  22.  *   * Redistributions of source code must retain the above
  23.  *     copyright notice, this list of conditions and the
  24.  *     following disclaimer.
  25.  *
  26.  *   * Redistributions in binary form must reproduce the above
  27.  *     copyright notice, this list of conditions and the
  28.  *     following disclaimer in the documentation and/or other
  29.  *     materials provided with the distribution.
  30.  *
  31.  *   * Neither the name of Yahoo! Inc. nor the names of its
  32.  *     contributors may be used to endorse or promote products
  33.  *     derived from this software without specific prior
  34.  *     written permission of Yahoo! Inc.
  35.  *
  36.  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  37.  *   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  38.  *   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  39.  *   DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  40.  *   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  41.  *   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  42.  *   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  43.  *   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  44.  *   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  45.  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46.  *
  47.  *   Please see the Yahoo! Developer Network forums for support: http://developer.yahoo.net/forum/
  48.  *
  49.  *   Documentation: http://developer.yahoo.com/social/sdk/php/
  50.  */
  51.  
  52.  
  53. /**
  54.  * The session store interface. Developers are free to implement their
  55.  * own session store implementations and pass them to YahooSession::hasSession,
  56.  * YahooSession::requireSession and YahooSession::clearSession.
  57.  *
  58.  * @brief The session store interface.
  59.  */
  60. interface YahooSessionStore {
  61.     /**
  62.      * Indicates if the session store has a request token.
  63.      *
  64.      * @return True if a request token is present, false otherwise.
  65.      */
  66.     function hasRequestToken(){}
  67.  
  68.     /**
  69.      * Indicates if the session store has an access token.
  70.      *
  71.      * @return True if an access token is present, false otherwise.
  72.      */
  73.     function hasAccessToken(){}
  74.  
  75.     /**
  76.      * Stores the given request token in the session store.
  77.      *
  78.      * @param $token A PHP stdclass object containing the components of
  79.      *                the OAuth request token.
  80.      * @return True on success, false otherwise.
  81.      */
  82.     function storeRequestToken($token){}
  83.  
  84.     /**
  85.      * Fetches and returns the request token from the session store.
  86.      *
  87.      * @return The request token.
  88.      */
  89.     function fetchRequestToken(){}
  90.  
  91.     /**
  92.      * Clears the request token from the session store.
  93.      *
  94.      * @return True on success, false otherwise.
  95.      */
  96.     function clearRequestToken(){}
  97.  
  98.     /**
  99.      * Stores the given access token in the session store.
  100.      *
  101.      * @param $token A PHP stdclass object containing the components of
  102.      *                the OAuth access token.
  103.      * @return True on success, false otherwise.
  104.      */
  105.     function storeAccessToken($token){}
  106.  
  107.     /**
  108.      * Fetches and returns the access token from the session store.
  109.      *
  110.      * @return The access token.
  111.      */
  112.     function fetchAccessToken(){}
  113.  
  114.     /**
  115.      * Clears the access token from the session store.
  116.      *
  117.      * @return True on success, false otherwise.
  118.      */
  119.     function clearAccessToken(){}
  120. }

Documentation generated on Thu, 22 Oct 2009 12:54:52 -0700 by phpDocumentor 1.4.3