add comment
This commit is contained in:
parent
0e0c24517f
commit
fbcffec3c2
|
@ -2,16 +2,16 @@ const log = require('color-logs')(true, true, "Categories.class.js");
|
|||
|
||||
var title,
|
||||
uri,
|
||||
description;
|
||||
description,
|
||||
articles = [];
|
||||
|
||||
class Categorie {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} title title of categorie
|
||||
* @param {string} uri uri of categorie
|
||||
* @param {string} description description of categorie
|
||||
* @returns {nm$_Categorie.class.Categorie}
|
||||
* @param {string} title : title of categorie
|
||||
* @param {string} uri : uri of categorie
|
||||
* @param {string} description : description of categorie
|
||||
*/
|
||||
constructor(title, uri, description){
|
||||
this.setTitle(title);
|
||||
|
@ -31,18 +31,45 @@ class Categorie {
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {object <Article>} articles : array of article object owned by this categorie
|
||||
*/
|
||||
setArticles(articles){
|
||||
this.articles.push(articles);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {string} title of categorie
|
||||
*/
|
||||
getTitle(){
|
||||
return this.title;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {string} uri of categorie
|
||||
*/
|
||||
getUri(){
|
||||
return this.uri;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {string} description of categories
|
||||
*/
|
||||
getDescription(){
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {array} article array of categories
|
||||
*/
|
||||
getArticles(){
|
||||
return this.articles;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Categorie;
|
Reference in New Issue