Services_Ebay
[ class tree: Services_Ebay ] [ index: Services_Ebay ] [ all elements ]

Source for file Static.php

Documentation is available at Static.php

  1. <?PHP
  2. /**
  3.  * Static Expiry Check
  4.  *
  5.  * $Id$
  6.  *
  7.  * @package Services_Ebay
  8.  * @author  Stephan Schmidt <schst@php.net>
  9.  */
  10. {
  11.    /**
  12.     * static lifetime of the cache
  13.     *
  14.     * @var  integer 
  15.     */
  16.     private $lifetime = null;
  17.     
  18.    /**
  19.     * constructor
  20.     *
  21.     * @param   integer      lifetime in seconds
  22.     */
  23.     public function __construct($lifetime)
  24.     {
  25.         $this->lifetime $lifetime;
  26.     }
  27.     
  28.    /**
  29.     * check, whether the cache is valid
  30.     *
  31.     * @param   string      type of the model
  32.     * @param   integer      timestamp the cache has been created
  33.     * @param   array        model properties stored in the cache
  34.     */
  35.     public function isValid($Type$timestamp$props)
  36.     {
  37.         if ($timestamp $this->lifetime time()) {
  38.             return true;
  39.         }
  40.         return false;
  41.     }
  42. }
  43. ?>

Documentation generated on Mon, 11 Mar 2019 15:49:50 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.