Source for file OnpubSAMap.php

Documentation is available at OnpubSAMap.php

  1. <?php
  2.  
  3. /**
  4.  * A section-article map.
  5.  *
  6.  * @author {@link mailto:corey@onpub.com Corey H.M. Taylor}
  7.  * @copyright Onpub (TM). Copyright 2012, Onpub.com.
  8.  *  {@link http://onpub.com/}
  9.  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
  10.  *  Version 2
  11.  * @package OnpubAPI
  12.  */
  13. class OnpubSAMap
  14. {
  15.   /**
  16.    * Section-article map ID. Default is NULL.
  17.    *
  18.    * @var int 
  19.    */
  20.   public $ID;
  21.   /**
  22.    * Section ID. Default is NULL.
  23.    *
  24.    * @var int 
  25.    */
  26.   public $sectionID;
  27.   /**
  28.    * Article ID. Default is NULL.
  29.    *
  30.    * @var int 
  31.    */
  32.   public $articleID;
  33.   private $created;
  34.   private $modified;
  35.  
  36.   function __construct()
  37.   {
  38.     $this->ID = NULL;
  39.     $this->sectionID = NULL;
  40.     $this->articleID = NULL;
  41.     $this->created NULL;
  42.     $this->modified NULL;
  43.   }
  44.  
  45.   /**
  46.    * Get this map's creation date.
  47.    *
  48.    * By default, returns the date at the time this method was called for the
  49.    * first time. Call {@link OnpubSAMap::setCreated()} to explicitly set
  50.    * this map's creation date.
  51.    *
  52.    * @return DateTime 
  53.    */
  54.   public function getCreated()
  55.   {
  56.     if ($this->created === NULL{
  57.       $this->created new DateTime();
  58.     }
  59.  
  60.     return $this->created;
  61.   }
  62.  
  63.   /**
  64.    * @param DateTime 
  65.    */
  66.   public function setCreated(DateTime $created)
  67.   {
  68.     $this->created $created;
  69.   }
  70.  
  71.   /**
  72.    * Get this map's last modification date.
  73.    *
  74.    * By default, returns the date at the time this method was called for the
  75.    * first time. Call {@link OnpubSAMap::setModified()} to explicitly set
  76.    * this map's last modification date.
  77.    *
  78.    * @return DateTime 
  79.    */
  80.   public function getModified()
  81.   {
  82.     if ($this->modified === NULL{
  83.       $this->modified new DateTime();
  84.     }
  85.  
  86.     return $this->modified;
  87.   }
  88.  
  89.   /**
  90.    * @param DateTime 
  91.    */
  92.   public function setModified(DateTime $modified)
  93.   {
  94.     $this->modified $modified;
  95.   }
  96. }
  97. ?>

Documentation generated on Fri, 08 Feb 2013 04:02:21 -0500 by phpDocumentor 1.4.4