Source for file OnpubAuthor.php

Documentation is available at OnpubAuthor.php

  1. <?php
  2.  
  3. /**
  4.  * An author.
  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.    * Author 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.    * Author's given names. Default is an empty string.
  28.    *
  29.    * @var string 
  30.    */
  31.   public $givenNames;
  32.   /**
  33.    * Author's family name. Default is an empty string.
  34.    *
  35.    * @var string 
  36.    */
  37.   public $familyName;
  38.   /**
  39.    * Author's display name. Default is an empty string.
  40.    *
  41.    * @var string 
  42.    */
  43.   public $displayAs;
  44.   /**
  45.    * Author's URL. Default is an empty string.
  46.    *
  47.    * @var string 
  48.    */
  49.   public $url;
  50.   private $created;
  51.   private $modified;
  52.   /**
  53.    * Author image. Default is NULL.
  54.    *
  55.    * @var OnpubImage 
  56.    */
  57.   public $image;
  58.  
  59.   function __construct()
  60.   {
  61.     $this->ID = NULL;
  62.     $this->imageID = NULL;
  63.     $this->givenNames = "";
  64.     $this->familyName = "";
  65.     $this->displayAs = "";
  66.     $this->url = "";
  67.     $this->created NULL;
  68.     $this->modified NULL;
  69.     $this->image = NULL;
  70.   }
  71.  
  72.   /**
  73.    * Get this author's creation date.
  74.    *
  75.    * By default, returns the date at the time this method was called for the
  76.    * first time. Call {@link OnpubAuthor::setCreated()} to explicitly set
  77.    * this author's creation date.
  78.    *
  79.    * @return DateTime 
  80.    */
  81.   public function getCreated()
  82.   {
  83.     if ($this->created === NULL{
  84.       $this->created new DateTime();
  85.     }
  86.  
  87.     return $this->created;
  88.   }
  89.  
  90.   /**
  91.    * @param DateTime 
  92.    */
  93.   public function setCreated(DateTime $created)
  94.   {
  95.     $this->created $created;
  96.   }
  97.  
  98.   /**
  99.    * Get this author's last modification date.
  100.    *
  101.    * By default, returns the date at the time this method was called for the
  102.    * first time. Call {@link OnpubAuthor::setModified()} to explicitly set
  103.    * this author's last modification date.
  104.    *
  105.    * @return DateTime 
  106.    */
  107.   public function getModified()
  108.   {
  109.     if ($this->modified === NULL{
  110.       $this->modified new DateTime();
  111.     }
  112.  
  113.     return $this->modified;
  114.   }
  115.  
  116.   /**
  117.    * @param DateTime 
  118.    */
  119.   public function setModified(DateTime $modified)
  120.   {
  121.     $this->modified $modified;
  122.   }
  123. }
  124. ?>

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