Overview

Packages

  • Auth
  • Config
  • Controller
  • Date
  • Db
  • Feed
    • Abstract
    • Writers
  • File
    • Decorator
  • Form
    • Element
  • Image
  • Log
    • Writer
  • Net
    • Exception
  • None
  • PHP
  • PHPMailer
  • Session
  • Util
  • Validate
    • Validator
  • Zend
    • Registry

Classes

  • Feed_Entry
  • Feed_Feed
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Pry Framework
  4:  *
  5:  * LICENSE
  6:  *
  7:  * This source file is subject to the new BSD license that is bundled
  8:  * with this package in the file LICENSE.txt.
  9:  * 
 10:  * @version $Revision: 276 $
 11:  */
 12: 
 13: /**
 14:  * Classe représentant un élément de flux.
 15:  * @category Pry
 16:  * @package Feed
 17:  * @version 1.1.0 
 18:  * @author Olivier ROGER <oroger.fr>
 19:  *       
 20:  */
 21: class Feed_Entry
 22: {
 23:     /**
 24:      * Id de l'élément
 25:      * @access private
 26:      * @var string
 27:      */
 28:     private $id;
 29:     
 30:     /**
 31:      * Titre de l'élément
 32:      * @access private
 33:      * @var string
 34:      */
 35:     private $title;
 36:     
 37:     /**
 38:      * Date de l'élément
 39:      * @access private
 40:      * @var string
 41:      */
 42:     private $date;
 43:     
 44:     /**
 45:      * Auteur de l'élément
 46:      * @access private
 47:      * @var array
 48:      */
 49:     private $author;
 50:     
 51:     /**
 52:      * Contenu de l'élément
 53:      * @access private
 54:      * @var string
 55:      */
 56:     private $content;
 57:     
 58:     /**
 59:      * Lien de l'élément
 60:      * @access private
 61:      * @var string
 62:      */
 63:     private $link;
 64:     
 65:     /**
 66:      * Liens vers les commentaires
 67:      * @access private
 68:      * @var string
 69:      */
 70:     private $comments;
 71:     
 72:     public function __construct(){
 73:         $this->author = array();    
 74:     }
 75:     
 76:     public function setTitle($title){
 77:         $this->title = $title;
 78:         return $this;
 79:     }
 80:     
 81:     public function setDate($date){
 82:         $this->date = $date;
 83:         return $this;
 84:     }
 85:     
 86:     public function setAuthor(array $author){
 87:         if(!is_array($author) || !key_exists('name',$author))
 88:             throw new InvalidArgumentException('Author doit être un Array');
 89:         $this->author = $author;
 90:         return $this;
 91:     }
 92:     
 93:     public function setContent($content){
 94:         $this->content = $content;
 95:         return $this;
 96:     }
 97:     
 98:     public function setLink($link){
 99:         $this->link = $link;
100:         return $this;
101:     }
102:     
103:     public function setId($id){
104:         $this->id = $id;
105:     }
106:     
107:     public function setComments($com){
108:         $this->comments = $com;
109:     }
110:     
111:     //Getter
112:     
113:     public function getTitle()
114:     {
115:         if(isset($this->title))
116:             return $this->title;
117:         return null;
118:     }
119:     
120:     public function getDate()
121:     {
122:         if(isset($this->date))
123:             return $this->date;
124:         return null;
125:     }
126:     
127:     public function getAuthor($key = null)
128:     {
129:         if(isset($this->author))
130:             if(!empty($key) && isset($this->author[$key]))
131:                 return $this->author[$key];
132:             else
133:                 return $this->author;
134:         return null;
135:     }
136:     
137:     public function getContent()
138:     {
139:         if(isset($this->content))
140:             return $this->content;
141:         return null;
142:     }
143:     
144:     public function getLink()
145:     {
146:         if(isset($this->link))
147:             return $this->link;
148:         return null;
149:     }
150:     
151:     public function getId()
152:     {
153:         if(isset($this->id))
154:             return $this->id;
155:         return null;
156:     }
157:     
158:     public function getComments()
159:     {
160:         if(isset($this->comments))
161:             return $this->comments;
162:         return null;
163:     }
164: 
165: }
166:  ?>
Pry Framework API documentation generated by ApiGen 2.6.1