[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/dao/ -> referer.class.php (source)

   1  <?php
   2  
   3      lt_include( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
   4  
   5      /**
   6       * \ingroup DAO
   7       * Represents a record from the 'referers' table, used to keep track
   8       * of the referers to articles.
   9       */
  10      class Referer extends DbObject 
  11      {
  12  
  13          var $_url;
  14          var $_articleId;
  15          var $_blogId;
  16          var $_count;
  17          var $_id;
  18          var $_date;
  19          var $_timestamp;
  20  
  21          /**
  22           * Constructor. Creates a new constructor object from the given
  23           * information.
  24           *
  25           * @param url The url specified in the referer header.
  26           * @param articleId The article from which we 'captured' the referer.
  27           * @param blogId The blog identifier.
  28           * @param date The date of the hit.
  29           * @param count How many times this referer has hit the article.
  30           * @param id Identifier of the referer.
  31           */
  32      	function Referer( $url, $articleId, $blogId, $date, $count = 0, $id = 0 )
  33          {
  34              lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
  35  
  36              $this->DbObject();
  37              $this->_url = $url;
  38              $this->_articleId = $articleId;
  39              $this->_blogId = $blogId;
  40              $this->_count = $count;
  41              $this->_id = $id;
  42              $this->_date = $date;
  43              $this->_timestamp = new Timestamp( $date );
  44          }
  45  
  46          /**
  47           * Returns the url of the referer.
  48           *
  49           * @return The url of the referer.
  50           */
  51          function getUrl()
  52          {
  53              return $this->_url;
  54          }
  55  
  56          /**
  57           * Returns the identifier of the article hit by this referer.
  58           *
  59           * @return The article identifier.
  60           */
  61          function getArticleId()
  62          {
  63              return $this->_articleId;
  64          }
  65  
  66          /**
  67           * Returns the identifier associated to this referer.
  68           *
  69           * @return The identifier of this object.
  70           */
  71          function getId()
  72          {
  73              return $this->_id;
  74          }
  75  
  76          /**
  77           * Returns the number of times this referer has hit this article.
  78           *
  79           * @return The number of times.
  80           */
  81          function getCount()
  82          {
  83              return $this->_count;
  84          }
  85  
  86          /**
  87           * Aliast for getCount()
  88           */
  89          function getHits()
  90          {
  91              return $this->getCount();
  92          }
  93  
  94          /**
  95           * Returns the blog identifier.
  96           *
  97           * @return The blog identifier.
  98           */
  99          function getBlogId()
 100          {
 101              return $this->_blogId;
 102          }
 103  
 104          /**
 105           * Returns the sql date.
 106           *
 107           * @return The date as appears in the database.
 108           */
 109          function getDate()
 110          {
 111              return $this->_date;
 112          }
 113  
 114          /**
 115           * Returns the Timestamp object representing the date.
 116           *
 117           * @return The Timestamp object representing the date.-
 118           */
 119          function getDateObject()
 120          {
 121              return $this->_timestamp;
 122          }        
 123      }
 124  ?>


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics