]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/CasAuthentication/extlib/CAS/PGTStorage/pgt-main.php
Introduced common_location_shared() to check if location sharing is always,
[quix0rs-gnu-social.git] / plugins / CasAuthentication / extlib / CAS / PGTStorage / pgt-main.php
index 8fd3c9e12ba1577176e4ea7535c1e4789e9ff172..cf4c4ed0f22f6e030e2b843a7673af85822a69fd 100644 (file)
-<?php
-
-/**
- * @file CAS/PGTStorage/pgt-main.php
- * Basic class for PGT storage
- */
-
-/**
- * @class PGTStorage
- * The PGTStorage class is a generic class for PGT storage. This class should
- * not be instanciated itself but inherited by specific PGT storage classes.
- *
- * @author   Pascal Aubry <pascal.aubry at univ-rennes1.fr>
- *
- * @ingroup internalPGTStorage
- */
-
-class PGTStorage
-{
-  /** 
-   * @addtogroup internalPGTStorage
-   * @{ 
-   */
-
-  // ########################################################################
-  //  CONSTRUCTOR
-  // ########################################################################
-  
-  /**
-   * The constructor of the class, should be called only by inherited classes.
-   *
-   * @param $cas_parent the CASclient instance that creates the current object.
-   *
-   * @protected
-   */
-  function PGTStorage($cas_parent)
-    {
-      phpCAS::traceBegin();
-      if ( !$cas_parent->isProxy() ) {
-       phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy'); 
-      }
-      phpCAS::traceEnd();
-    }
-
-  // ########################################################################
-  //  DEBUGGING
-  // ########################################################################
-  
-  /**
-   * This virtual method returns an informational string giving the type of storage
-   * used by the object (used for debugging purposes).
-   *
-   * @public
-   */
-  function getStorageType()
-    {
-      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); 
-    }
-
-  /**
-   * This virtual method returns an informational string giving informations on the
-   * parameters of the storage.(used for debugging purposes).
-   *
-   * @public
-   */
-  function getStorageInfo()
-    {
-      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); 
-    }
-
-  // ########################################################################
-  //  ERROR HANDLING
-  // ########################################################################
-  
-  /**
-   * string used to store an error message. Written by PGTStorage::setErrorMessage(),
-   * read by PGTStorage::getErrorMessage().
-   *
-   * @hideinitializer
-   * @private
-   * @deprecated not used.
-   */
-  var $_error_message=FALSE;
-
-  /**
-   * This method sets en error message, which can be read later by 
-   * PGTStorage::getErrorMessage().
-   *
-   * @param $error_message an error message
-   *
-   * @protected
-   * @deprecated not used.
-   */
-  function setErrorMessage($error_message)
-    {
-      $this->_error_message = $error_message;
-    }
-
-  /**
-   * This method returns an error message set by PGTStorage::setErrorMessage().
-   *
-   * @return an error message when set by PGTStorage::setErrorMessage(), FALSE
-   * otherwise.
-   *
-   * @public
-   * @deprecated not used.
-   */
-  function getErrorMessage()
-    {
-      return $this->_error_message;
-    }
-
-  // ########################################################################
-  //  INITIALIZATION
-  // ########################################################################
-
-  /**
-   * a boolean telling if the storage has already been initialized. Written by 
-   * PGTStorage::init(), read by PGTStorage::isInitialized().
-   *
-   * @hideinitializer
-   * @private
-   */
-  var $_initialized = FALSE;
-
-  /**
-   * This method tells if the storage has already been intialized.
-   *
-   * @return a boolean
-   *
-   * @protected
-   */
-  function isInitialized()
-    {
-      return $this->_initialized;
-    }
-
-  /**
-   * This virtual method initializes the object.
-   *
-   * @protected
-   */
-  function init()
-    {
-      $this->_initialized = TRUE;
-    }
-
-  // ########################################################################
-  //  PGT I/O
-  // ########################################################################
-
-  /**
-   * This virtual method stores a PGT and its corresponding PGT Iuo.
-   * @note Should never be called.
-   *
-   * @param $pgt the PGT
-   * @param $pgt_iou the PGT iou
-   *
-   * @protected
-   */
-  function write($pgt,$pgt_iou)
-    {
-      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); 
-    }
-
-  /**
-   * This virtual method reads a PGT corresponding to a PGT Iou and deletes
-   * the corresponding storage entry.
-   * @note Should never be called.
-   *
-   * @param $pgt_iou the PGT iou
-   *
-   * @protected
-   */
-  function read($pgt_iou)
-    {
-      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); 
-    }
-
-  /** @} */
-  
-} 
-
-// include specific PGT storage classes
-include_once(dirname(__FILE__).'/pgt-file.php'); 
-include_once(dirname(__FILE__).'/pgt-db.php');
-  
+<?php\r
+/*\r
+ * Copyright © 2003-2010, The ESUP-Portail consortium & the JA-SIG Collaborative.\r
+ * All rights reserved.\r
+ * \r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions are met:\r
+ * \r
+ *     * Redistributions of source code must retain the above copyright notice,\r
+ *       this list of conditions and the following disclaimer.\r
+ *     * Redistributions in binary form must reproduce the above copyright notice,\r
+ *       this list of conditions and the following disclaimer in the documentation\r
+ *       and/or other materials provided with the distribution.\r
+ *     * Neither the name of the ESUP-Portail consortium & the JA-SIG\r
+ *       Collaborative nor the names of its contributors may be used to endorse or\r
+ *       promote products derived from this software without specific prior\r
+ *       written permission.\r
+\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\r
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\r
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\r
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\r
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+/**\r
+ * @file CAS/PGTStorage/pgt-main.php\r
+ * Basic class for PGT storage\r
+ */\r
+\r
+/**\r
+ * @class PGTStorage\r
+ * The PGTStorage class is a generic class for PGT storage. This class should\r
+ * not be instanciated itself but inherited by specific PGT storage classes.\r
+ *\r
+ * @author   Pascal Aubry <pascal.aubry at univ-rennes1.fr>\r
+ *\r
+ * @ingroup internalPGTStorage\r
+ */\r
+\r
+class PGTStorage\r
+{\r
+  /** \r
+   * @addtogroup internalPGTStorage\r
+   * @{ \r
+   */\r
+\r
+  // ########################################################################\r
+  //  CONSTRUCTOR\r
+  // ########################################################################\r
+  \r
+  /**\r
+   * The constructor of the class, should be called only by inherited classes.\r
+   *\r
+   * @param $cas_parent the CASclient instance that creates the current object.\r
+   *\r
+   * @protected\r
+   */\r
+  function PGTStorage($cas_parent)\r
+    {\r
+      phpCAS::traceBegin();\r
+      if ( !$cas_parent->isProxy() ) {\r
+       phpCAS::error('defining PGT storage makes no sense when not using a CAS proxy'); \r
+      }\r
+      phpCAS::traceEnd();\r
+    }\r
+\r
+  // ########################################################################\r
+  //  DEBUGGING\r
+  // ########################################################################\r
+  \r
+  /**\r
+   * This virtual method returns an informational string giving the type of storage\r
+   * used by the object (used for debugging purposes).\r
+   *\r
+   * @public\r
+   */\r
+  function getStorageType()\r
+    {\r
+      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); \r
+    }\r
+\r
+  /**\r
+   * This virtual method returns an informational string giving informations on the\r
+   * parameters of the storage.(used for debugging purposes).\r
+   *\r
+   * @public\r
+   */\r
+  function getStorageInfo()\r
+    {\r
+      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); \r
+    }\r
+\r
+  // ########################################################################\r
+  //  ERROR HANDLING\r
+  // ########################################################################\r
+  \r
+  /**\r
+   * string used to store an error message. Written by PGTStorage::setErrorMessage(),\r
+   * read by PGTStorage::getErrorMessage().\r
+   *\r
+   * @hideinitializer\r
+   * @private\r
+   * @deprecated not used.\r
+   */\r
+  var $_error_message=FALSE;\r
+\r
+  /**\r
+   * This method sets en error message, which can be read later by \r
+   * PGTStorage::getErrorMessage().\r
+   *\r
+   * @param $error_message an error message\r
+   *\r
+   * @protected\r
+   * @deprecated not used.\r
+   */\r
+  function setErrorMessage($error_message)\r
+    {\r
+      $this->_error_message = $error_message;\r
+    }\r
+\r
+  /**\r
+   * This method returns an error message set by PGTStorage::setErrorMessage().\r
+   *\r
+   * @return an error message when set by PGTStorage::setErrorMessage(), FALSE\r
+   * otherwise.\r
+   *\r
+   * @public\r
+   * @deprecated not used.\r
+   */\r
+  function getErrorMessage()\r
+    {\r
+      return $this->_error_message;\r
+    }\r
+\r
+  // ########################################################################\r
+  //  INITIALIZATION\r
+  // ########################################################################\r
+\r
+  /**\r
+   * a boolean telling if the storage has already been initialized. Written by \r
+   * PGTStorage::init(), read by PGTStorage::isInitialized().\r
+   *\r
+   * @hideinitializer\r
+   * @private\r
+   */\r
+  var $_initialized = FALSE;\r
+\r
+  /**\r
+   * This method tells if the storage has already been intialized.\r
+   *\r
+   * @return a boolean\r
+   *\r
+   * @protected\r
+   */\r
+  function isInitialized()\r
+    {\r
+      return $this->_initialized;\r
+    }\r
+\r
+  /**\r
+   * This virtual method initializes the object.\r
+   *\r
+   * @protected\r
+   */\r
+  function init()\r
+    {\r
+      $this->_initialized = TRUE;\r
+    }\r
+\r
+  // ########################################################################\r
+  //  PGT I/O\r
+  // ########################################################################\r
+\r
+  /**\r
+   * This virtual method stores a PGT and its corresponding PGT Iuo.\r
+   * @note Should never be called.\r
+   *\r
+   * @param $pgt the PGT\r
+   * @param $pgt_iou the PGT iou\r
+   *\r
+   * @protected\r
+   */\r
+  function write($pgt,$pgt_iou)\r
+    {\r
+      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); \r
+    }\r
+\r
+  /**\r
+   * This virtual method reads a PGT corresponding to a PGT Iou and deletes\r
+   * the corresponding storage entry.\r
+   * @note Should never be called.\r
+   *\r
+   * @param $pgt_iou the PGT iou\r
+   *\r
+   * @protected\r
+   */\r
+  function read($pgt_iou)\r
+    {\r
+      phpCAS::error(__CLASS__.'::'.__FUNCTION__.'() should never be called'); \r
+    }\r
+\r
+  /** @} */\r
+  \r
+} \r
+\r
+// include specific PGT storage classes\r
+include_once(dirname(__FILE__).'/pgt-file.php'); \r
+include_once(dirname(__FILE__).'/pgt-db.php');\r
+  \r
 ?>
\ No newline at end of file