[ 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/ -> articlecategory.class.php (sommaire)

(pas de description)

Poids: 398 lignes (10 kb)
Inclus ou requis:0 fois
Référencé: 7 fois
Nécessite: 0 fichiers

Définit 1 class

ArticleCategory:: (29 méthodes):
  ArticleCategory()
  setId()
  setName()
  setURL()
  setBlogId()
  setParentId()
  setParentCategory()
  setDescription()
  getId()
  getName()
  getURL()
  getBlogId()
  getNumArticles()
  getNumAllArticles()
  getNumPublishedArticles()
  setNumPublishedArticles()
  setNumArticles()
  getArticles()
  getParentId()
  getParentCategory()
  isInMainPage()
  setInMainPage()
  getDescription()
  getLastModification()
  setLastModification()
  getMangledName()
  setMangledName()
  getBlog()
  __sleep()


Classe: ArticleCategory  - X-Ref

\ingroup DAO

Represents an article category.
ArticleCategory( $name, $url, $blogId, $inMainPage, $description = "", $numArticles = 0, $properties = Array()   X-Ref
Creates an article category.

param: name The name given to the new category
param: url Not used.
param: blogId The id of the blog to which this category id assigned.
param: inMainPage Whether posts belonging to this category should be shown in the front page of the blog or not.
param: description Description of the category, defaults to nothing.
param: numArticles Number of articles in this category, defaults to '0'.
param: properties Not used.
param: id Id assigned to this category in the database, defaults to '-1' and it is ignored for new categories.
param: lastModification Date when this category was last modified.
param: parentId Id of the parent category, not used as of LifeType 1.1.

setId( $newId )   X-Ref


setName( $newName )   X-Ref


setURL( $newURL )   X-Ref


setBlogId( $blogId )   X-Ref


setParentId( $parentId )   X-Ref
sets the parent category id

param: parentId The id of the parent category

setParentCategory( $parentCategory )   X-Ref
sets the parent ArticleCategory object

param: An ArticleCategory object representing the parent category

setDescription( $desc )   X-Ref
sets the description

param: description

getId()   X-Ref
Returns the identifier assigned to this category.

return: An integer value with the category number.

getName()   X-Ref
Returns the name assigned to the category.

return: A string value with the name assigned to the category.

getURL()   X-Ref


getBlogId()   X-Ref
Returns the identifier of the blog to which this category belongs.

return: An integer value containing the identifier to which this category belongs.

getNumArticles( $status = POST_STATUS_PUBLISHED )   X-Ref
Returns how many articles have been categorized under this category.

param: status A valid post status
return: An integer value

getNumAllArticles()   X-Ref
shorthand method for getting the total number of articles in the category, regardless of the
status

return: the total number of posts

getNumPublishedArticles()   X-Ref
Returns the number of articles that have a published status in this category

return: Number of published articles

setNumPublishedArticles( $num )   X-Ref
Sets the number of articles that have a published status in this category. This method
should usually not be called unless we want to mess up counters.


setNumArticles( $num )   X-Ref
Sets the number of articles in this category. This method
should usually not be called unless we want to mess up counters.


getArticles( $status = POST_STATUS_PUBLISHED )   X-Ref
returns the articles categorized here

param: an array of Article obejcts

getParentId()   X-Ref
returns the id of the parent category

return: The id of the parent category

getParentCategory()   X-Ref
returns the parent ArticleCategory object

return: An ArticleCategory object representing the parent category

isInMainPage()   X-Ref
Returns true if the category has been configured to be shown in the main
page or not.

return: True wether the category is shown in main page, or false otherwise.

setInMainPage( $show )   X-Ref
If set to true, enables the category to be shown in the main page, or false
otherwise.

param: show True or false, depending wether we'd like to show the category in

getDescription()   X-Ref
returns the description

return: The description

getLastModification()   X-Ref
returns the last modification date

return: A Timestamp object

setLastModification( $newDate )   X-Ref
Sets the date in which this category was last modified

param: newDate a Timestamp object containing the date in which this category was last modified

getMangledName()   X-Ref
Returns the 'mangled' version of the name of this category, used for generating nicer
links when custom URLs are enabled. It may not work with double-byte languages.

return: A string containing a 'url-ified' version of the category name

setMangledName( $mangledName )   X-Ref
Sets the 'mangled' version of the name of this category, used for generating nicer
links when custom URLs are enabled.

param: mangledName A string containing a 'url-ified' version of the category name

getBlog()   X-Ref
Returns the BlogInfo object to which this category belongs

return: A BlogInfo object

__sleep()   X-Ref




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