[ Index ] |
|
Code source de LifeType 1.2.4 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 1136 lignes (30 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 9 fois |
Nécessite: | 0 fichiers |
Article:: (80 méthodes):
Article()
getTopic()
getText()
getIntroText()
setIntroText()
getExtendedText()
setExtendedText()
hasExtendedText()
getCategoryIds()
getCategories()
getCategory()
getId()
getUser()
getUserId()
getDate()
getDateWithoutOffset()
getComments()
getTrackbacks()
getUserInfo()
getBlog()
getBlogId()
getStatus()
getBlogInfo()
getNumReads()
getProperties()
getCommentsEnabled()
setUserInfo()
setTopic()
setText()
setCategoryIds()
setCategories()
setId()
setUser()
setComments()
setTrackbacks()
setBlog()
setStatus()
isDraft()
isDeleted()
isPublished()
getTotalComments()
getNumComments()
getTotalTrackbacks()
getNumTrackbacks()
setTotalComments()
setNumComments()
setNumTrackbacks()
setTotalTrackbacks()
setDate()
setModificationDate()
getModificationDate()
getModificationDateWithoutOffset()
getModificationTimestamp()
getDateObject()
setBlogInfo()
setNumReads()
setDateObject()
setProperties()
setCommentsEnabled()
setTimeOffset()
getTimeOffset()
setFields()
getCustomFields()
getFieldObject()
setFieldObject()
getFieldDescription()
getField()
hasField()
getPostSlug()
setPostSlug()
getPrevArticle()
getNextArticle()
getArticleResources()
getGlobalCategoryId()
setGlobalCategoryId()
getGlobalCategory()
setGlobalCategory()
__sleep()
getInSummary()
setInSummary()
Article( $topic, $text, $categories, $user, $blog, $status, $numReads, $properties = Array() X-Ref |
Constructor. param: topic Topic of the article param: text Text of the article param: categories An array with the ids of all the categories to which this article belongs param: user Identifier of the user who posted the article param: blog Identifier of the blog to which the article belongs param: status Can be either POST_STATUS_PUBLISHED, POST_STATUS_DRAFT or POST_STATUS_DELETED param: numReads How many times the article has been read. param: properties An associative array containing some settings for the post, param: id If present, the identifier of the article in the database |
getTopic() X-Ref |
Returns the topic of the article return: The topic |
getText( $replace = '' ) X-Ref |
Returns the text of the article param: replace a string, usually html syntax, to "split" return: The text |
getIntroText() X-Ref |
returns the intro text for the post return: The intro text for the post |
setIntroText( $introText ) X-Ref |
sets the intro text param: introText the new intro text |
getExtendedText() X-Ref |
returns the extended text return: the extended text, if any. |
setExtendedText( $extendedText ) X-Ref |
sets the extended text param: extendedText the new extended text |
hasExtendedText() X-Ref |
returns whether this article has extended text or not return: true if this article has extended text or false otherwise |
getCategoryIds() X-Ref |
returns an array with all the category ids that this post has return: An array of category ids |
getCategories() X-Ref |
Returns the ArticleCategory object. return: The ArticleCategory object. |
getCategory() X-Ref |
this method will return the first category of the article, but it's here only for compatibility reasons!!! Please use getCategories and then loop through the returned array return: an ArticleCategory object |
getId() X-Ref |
Returns the identifier assigned to this article. return: An integer value representing the identifier. |
getUser() X-Ref |
The identifier of the user who posted this comment NOTE: This is rather disturbing, i would expect to get a User Object when calling getUser(), i've added getUserId() which is more precise, but left this one in here to stay backward compatible. return: An integer value representing the user idenfitier. |
getUserId() X-Ref |
Returns the identifier of the user who posted this article return: An integer |
getDate() X-Ref |
Returns the date, 14-digit format straight from the database. return: The 14-digit representation of the date. |
getDateWithoutOffset() X-Ref |
Return the date without the time offset applied. This is used so that we don't save the wrong date to the database when updating this post. For general purpose date queries, you don't need to use this method, please use getDate. return: an SQL timestamp |
getComments( $status = COMMENT_STATUS_NONSPAM ) X-Ref |
Returns an array of UserComment objects, with all the comments that have been received for this article. param: onlyActive return only those comments that are not marked as spam return: An array of UserComment objects. |
getTrackbacks( $onlyActive = true ) X-Ref |
Returns an array of Trackback objects, with all the trackbacks that have been received for this article. param: onlyActive return only those trackbacks that are not marked as spam return: An array of Trackback objects. |
getUserInfo() X-Ref |
Returns the UserInfo object containing information about the owner of this post. return: A UserInfo object. |
getBlog() X-Ref |
Returns the blog identifier to which this article belongs. NOTE: This is rather disturbing, i would expect to get a Blog Object when calling getBlog(), i've added getBlogId() which is more precise, but left this one in here to stay backward compatible. return: An integer value representing the blog identifier. |
getBlogId() X-Ref |
Returns the blog identifier to which this article belongs. return: An integer value representing the blog identifier. |
getStatus() X-Ref |
Returns the status of the article: <ul><li>published</li><li>draft</li><li>deleted</li></ul> return: A string value representing the status of the post. |
getBlogInfo() X-Ref |
Returns the BlogInfo object with information regarding the blog to which this article belongs. return: The BlogInfo object. |
getNumReads() X-Ref |
Returns the number of times this article has been visited. return: An integer value representing the number of times this article has been read. |
getProperties() X-Ref |
Returns the properties array return: An associative array |
getCommentsEnabled() X-Ref |
returns whether comments are enabled or not return: true if comments are enabled for this post or false otherwise |
setUserInfo( $newUserInfo ) X-Ref |
setTopic( $newTopic ) X-Ref |
setText( $newText ) X-Ref |
setCategoryIds( $newCategories ) X-Ref |
Changes the category id |
setCategories( $categories ) X-Ref |
setId( $newId ) X-Ref |
setUser( $newUser ) X-Ref |
setComments( $comments, $status = COMMENT_STATUS_NONSPAM ) X-Ref |
setTrackbacks( $trackbacks ) X-Ref |
setBlog( $blog ) X-Ref |
setStatus( $status ) X-Ref |
isDraft() X-Ref |
Returns true wether this post has the 'DRAFT' status. return: True if the post is a draft or false otherwise. |
isDeleted() X-Ref |
Returns true wether this post has been deleted or not (status == DELETED) return: True if the post as deleted or false otherwise. |
isPublished() X-Ref |
Returns true wether this post has been published or not (status == PUBLISHED) True if the post has been published or false otherwise. |
getTotalComments() X-Ref |
Returns the total number of comments that this post has (only the number!!) return: An integer containing the total number of comments that this post has. |
getNumComments() X-Ref |
Returns the number of comments that this post has (only the number!!) return: An integer containing the number of comments that this post has. |
getTotalTrackbacks() X-Ref |
Returns the total number of trackback pings that this post has received. return: An integer representing the number of trackback pings. |
getNumTrackbacks() X-Ref |
Returns the number of trackback pings that this post has received. param: onlyActive return only the number of active (as in non-spam, etc) return: An integer representing the number of trackback pings. |
setTotalComments( $totalComments ) X-Ref |
sets the total number of active comments |
setNumComments( $numComments ) X-Ref |
setNumTrackbacks( $numTrackbacks ) X-Ref |
setTotalTrackbacks( $totalTrackbacks ) X-Ref |
setDate( $newDate ) X-Ref |
setModificationDate( $newDate ) X-Ref |
Sets the date in which this article was last modified. param: newDate a 14-digit date in SQL's TIMESTAMP format. |
getModificationDate() X-Ref |
Returns the date when the post was last modified return: an SQL timestamp |
getModificationDateWithoutOffset() X-Ref |
Return the date without the time offset applied. This is used so that we don't save the wrong date to the database when updating this post. For general purpose date queries, you don't need to use this method, please use getDate. return: an SQL timestamp |
getModificationTimestamp() X-Ref |
Returns the date when the post was last modified as a Timestamp object return: a Timestamp object |
getDateObject() X-Ref |
Returns the Timestamp object representing the date when this post was posed. return: A Timestamp object representing the date. |
setBlogInfo( $blogInfo ) X-Ref |
setNumReads( $numReads ) X-Ref |
setDateObject( $newTimestamp ) X-Ref |
sets a new Timestamp object for this post, so that we can change the date of the post if necessary. |
setProperties( $properties ) X-Ref |
setCommentsEnabled( $commentsEnabled ) X-Ref |
enables or disables comments param: commentsEnabled Set it to true to enable comments or to false to disable them |
setTimeOffset( $timeOffset ) X-Ref |
sets the time offset param: timeOffset |
getTimeOffset() X-Ref |
gets the time offset return: the time offset |
setFields( $fields ) X-Ref |
Sets the values that this post has for the custom fields that have been defined so far. param: fields An array of CustomFieldValue objects containing some information about the return: Always true |
getCustomFields() X-Ref |
Returns the array of CustomFieldValue objects return: An array of CustomFieldValue objects |
getFieldObject( $fieldName ) X-Ref |
Returns a particular CustomFieldValue object param: fieldName return: A CustomFieldValue object |
setFieldObject( $fieldValue ) X-Ref |
sets a particular CustomFieldValue object param: fieldValue return: always true |
getFieldDescription( $fieldName ) X-Ref |
Returns the description of the given f ield param: fieldName return: A string |
getField( $fieldName ) X-Ref |
Gets the value of the given field. param: fieldName param: defaultValue The value that should be returned if the field has no value return: A string |
hasField( $fieldName ) X-Ref |
Tells whether the given field name has a value in this post or not param: fieldName return: True whether it has a value or false otherwise. |
getPostSlug() X-Ref |
returns the post slug return: a string with the post slug |
setPostSlug( $slug ) X-Ref |
sets a new post slug param: slug the new post slug |
getPrevArticle() X-Ref |
returns the previous article in time return: an Article object representing the previous article, in time, in the database |
getNextArticle() X-Ref |
returns the next article in time return: an Article object representing the next article, in time, in the database |
getArticleResources() X-Ref |
returns all the resources which are linked in this post. It basically looks at the "id" attribute of all links. When the resource has been added via the "add resource" pop-up window from the "new post" and "edit post" pages from the admin interface contains something like "res_XX" where "XX" is the internal id of the resource. If this id attribute is not found this method will not work. We could not find a better way to identify these resources... return: An array of GalleryResource objects containing all the resources |
getGlobalCategoryId() X-Ref |
returns the article global category id return: the global category id |
setGlobalCategoryId( $id ) X-Ref |
sets the global category id param: id the new category id |
getGlobalCategory() X-Ref |
return: Returns a GlobalArticleCategory object, or null if this article |
setGlobalCategory( $category ) X-Ref |
sets a new global category param: category A valid GlobalArticleCategory object |
__sleep() X-Ref |
getInSummary() X-Ref |
Returns whether this article should appear in the front summary.php page or not return: boolean value |
setInSummary( $inSummary ) X-Ref |
Whether to make this post appear in the front summary.php page param: inSummary |
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |