Source for file OnpubWebsite.php

Documentation is available at OnpubWebsite.php

  1. <?php
  2.  
  3. /**
  4.  * A website.
  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. {
  14.   /**
  15.    * Website ID. Default is NULL.
  16.    *
  17.    * @var int 
  18.    */
  19.   public $ID;
  20.   /**
  21.    * Image ID. Default is NULL.
  22.    *
  23.    * @var int 
  24.    */
  25.   public $imageID;
  26.   /**
  27.    * Website name. Default is an empty string.
  28.    *
  29.    * @var string 
  30.    */
  31.   public $name;
  32.   /**
  33.    * Website URL. Default is an empty string.
  34.    *
  35.    * @var string 
  36.    */
  37.   public $url;
  38.   /**
  39.    * Images URL. Default is an empty string.
  40.    *
  41.    * @var string 
  42.    */
  43.   public $imagesURL;
  44.   /**
  45.    * Images directory. Default is an empty string.
  46.    *
  47.    * @var string 
  48.    */
  49.   public $imagesDirectory;
  50.   private $created;
  51.   private $modified;
  52.   /**
  53.    * Website sections. Default is an empty array.
  54.    *
  55.    * @var array 
  56.    */
  57.   public $sections;
  58.   /**
  59.    * Website articles. Default is an empty array.
  60.    *
  61.    * @var array 
  62.    */
  63.   public $articles;
  64.   /**
  65.    * Website image. Default is NULL.
  66.    *
  67.    * @var OnpubImage 
  68.    */
  69.   public $image;
  70.  
  71.   function __construct()
  72.   {
  73.     $this->ID = NULL;
  74.     $this->imageID = NULL;
  75.     $this->name = "";
  76.     $this->url = "";
  77.     $this->imagesURL = "";
  78.     $this->imagesDirectory = "";
  79.     $this->created NULL;
  80.     $this->modified NULL;
  81.     $this->sections = array();
  82.     $this->articles = array();
  83.     $this->image = NULL;
  84.   }
  85.  
  86.   /**
  87.    * Get this website's creation date.
  88.    *
  89.    * By default, returns the date at the time this method was called for the
  90.    * first time. Call {@link OnpubWebsite::setCreated()} to explicitly set
  91.    * this website's creation date.
  92.    *
  93.    * @return DateTime 
  94.    */
  95.   public function getCreated()
  96.   {
  97.     if ($this->created === NULL{
  98.       $this->created new DateTime();
  99.     }
  100.  
  101.     return $this->created;
  102.   }
  103.  
  104.   /**
  105.    * @param DateTime 
  106.    */
  107.   public function setCreated(DateTime $created)
  108.   {
  109.     $this->created $created;
  110.   }
  111.  
  112.   /**
  113.    * Get this website's last modification date.
  114.    *
  115.    * By default, returns the date at the time this method was called for the
  116.    * first time. Call {@link OnpubWebsite::setModified()} to explicitly set
  117.    * this website's last modification date.
  118.    *
  119.    * @return DateTime 
  120.    */
  121.   public function getModified()
  122.   {
  123.     if ($this->modified === NULL{
  124.       $this->modified new DateTime();
  125.     }
  126.  
  127.     return $this->modified;
  128.   }
  129.  
  130.   /**
  131.    * @param DateTime 
  132.    */
  133.   public function setModified(DateTime $modified)
  134.   {
  135.     $this->modified $modified;
  136.   }
  137. }
  138. ?>

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