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

(pas de description)

Poids: 366 lignes (13 kb)
Inclus ou requis:0 fois
Référencé: 26 fois
Nécessite: 0 fichiers

Définit 1 class

ArticleCategories:: (12 méthodes):
  ArticleCategories()
  getCategory()
  getCategoryByName()
  getSearchConditions()
  getBlogCategories()
  mapRow()
  addArticleCategory()
  deleteCategory()
  deleteBlogCategories()
  updateCategory()
  getArticleCategories()
  getBlogNumCategories()


Classe: ArticleCategories  - X-Ref

\ingroup DAO

Implementation of the database logic for dealing with article categories. This class offers all the most
common methods: getCategory, addCategory, deleteCategory, etc.
ArticleCategories()   X-Ref
Constructor, does nothing special.


getCategory( $categoryId, $blogId = -1 )   X-Ref
Returns an article category from the database, given its id

param: categoryId Identifier of the category
param: blogId The blog identifier to which the category belongs
return: an ArticleCategory object representing a category from the database

getCategoryByName( $categoryName, $blogId = -1 )   X-Ref
returns a category based on its name

param: categoryName
param: blogId
return: An ArticleCategory object

getSearchConditions( $searchTerms )   X-Ref


getBlogCategories( $blogId, $onlyInMainPage = false, $order = BLOG_CATEGORIES_DEFAULT_ORDER, $searchTerms = "", $page = -1, $itemsPerPage = 15 )   X-Ref
Returns the categories that belong to a given blog

param: blogId The identifer of the blog from which we want to fetch the
param: onlyInMainPage Returns only the categories that have been configured
param: In which order the list of categories should be returned. It can be any of the following
param: searchTerms
param: page
param: itemsPerPage
return: An array containing all the categories from a given blog.

mapRow( $row )   X-Ref


addArticleCategory( &$articleCategory )   X-Ref
Adds an article category to the database.

param: category A Category object with all the information needed to add it
return: False if error or the article category identifier if successful.

deleteCategory( $categoryId, $blogId )   X-Ref
Removes a category from the database. We should check <b>beforehand</b> that such category
does not have any article classified under it, since then we would have problems
with the database.

param: $categoryId The identifier of the category
param: $blogId The blog identifier to which the article belongs
return: True if success or false otherwise.

deleteBlogCategories( $blogId )   X-Ref
Removes all the posts from the given blog

param: blogId The blog identifier

updateCategory( $category )   X-Ref
Updates a category.

param: category An ArticleCategory object with the information about the category we're
return: True if successful or false otherwise.

getArticleCategories( $articleId, $blogId = -1 )   X-Ref
returns all the categories that an article has been assigned to an article

param: artcleId The artcle id
param: blogId The blog id. This is an optiona parameter however, it is recommended to
return: An aray of ArticleCategories object that were assigned to this article.         

getBlogNumCategories( $blogId, $includeHidden = false, $searchTerms = "" )   X-Ref
returns how many categories a blog has

param: blogId
param: includeHidden
param: searchTerms
return: an integer



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