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

(pas de description)

Poids: 636 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 8 fois
Nécessite: 0 fichiers

Définit 1 class

UserComment:: (50 méthodes):
  UserComment()
  getId()
  setId()
  getArticleId()
  setArticleId()
  getUserName()
  setUserName()
  getUserEmail()
  setUserEmail()
  getUserUrl()
  setUserUrl()
  getText()
  setText()
  getTopic()
  setTopic()
  getDate()
  setDate()
  getDateObject()
  getParentId()
  setParentId()
  getTimestamp()
  getClientIp()
  setClientIp()
  setSpamRate()
  getSpamRate()
  setStatus()
  getStatus()
  setArticle()
  getArticle()
  getType()
  setType()
  getSendNotification()
  setSendNotification()
  getBlogId()
  setBlogId()
  getUrl()
  getTitle()
  getExcerpt()
  getBlogName()
  getBlogInfo()
  setNormalizedText()
  getNormalizedText()
  setNormalizedTopic()
  getNormalizedTopic()
  IsPosterAuthenticated()
  getUser()
  getUserId()
  setUserId()
  setUser()
  __sleep()


Classe: UserComment  - X-Ref

This class represents a comment made by a casual user to an article. Please use the getter methods
exposed here to get all the information regarding this comment, such as the name of the user who
posted it, the email address and even the ip of the machine from which the comment was posted.

\ingroup DAO
UserComment( $artid, $blogId, $parentid, $topic, $text, $date = null, $userName = "", $userEmail = "", $userUrl = "", $clientIp = "0.0.0.0", $spamRate = 0, $status = COMMENT_STATUS_NONSPAM, $properties = Array()   X-Ref
Creates a new user comment.


getId()   X-Ref
Returns the identifier assigned to this comment in the database.

return: Returns an integer value representing the identifier.

setId( $newid )   X-Ref
Sets a new identifier.


getArticleId()   X-Ref
Returns the article identifier to which this comment belongs.

return: An integer value representing the article identifier.

setArticleId( $newartid )   X-Ref
Sets the article identifier.


getUserName()   X-Ref
Returns the name of the user who posted this comment.

return: A string representing the name of the user, if any.

setUserName( $userName )   X-Ref
Sets the username.


getUserEmail()   X-Ref
Gets the email address of the user who posted this message, as it was posted by him or her, and if any.

return: An string with the email address of the user.

setUserEmail( $userEmail )   X-Ref
Sets the email address.


getUserUrl()   X-Ref
Returns the address specified by the user in the post, if any.

return: The url as specified by the user.

setUserUrl( $userUrl )   X-Ref
Sets the user url.


getText()   X-Ref
Returns the text of the comment.

return: A string with the text of the comment.

setText( $newtext )   X-Ref
Sets the text of the comment.


getTopic()   X-Ref
Returns the topic of the comment.

return: A string withthe topic of the comment.

setTopic( $newtopic )   X-Ref
Sets the topic of the comment.


getDate()   X-Ref
Returns the 14-digit date as specified by the database.

return: A 14-digit date, straight from the database.

setDate( $newdate )   X-Ref
Sets a new date


getDateObject()   X-Ref
Returns a Timestamp object representing the date. The Timestamp class offers commodity
methods to access only some parts of the date, and to format it according to our tastes.


getParentId()   X-Ref
Returns the identifier of the comment to which this one was replying.

return: The identifier of the comment to which this one was replying, or 0 if it was not replying

setParentId( $parentId )   X-Ref
Sets the parent id.


getTimestamp()   X-Ref
Alias for the function getDateObject


getClientIp()   X-Ref
Returns an string representing the ip of the machine from which this comment
was posted. It is not very reliable since that ip could have been through many
proxies.

return: A string representing the ip address.

setClientIp( $clientIp )   X-Ref
Sets the ip address.


setSpamRate( $spamRate )   X-Ref
Sets the spamn rate of this comment

param: spamRate The new spam rate

getSpamRate()   X-Ref

return: Returns the spam rate of this comment

setStatus( $status )   X-Ref
Sets the status of this comment

param: status The new status

getStatus()   X-Ref

return: Returns the new status of this comment

setArticle( $article )   X-Ref
sets the Article object to which this comment belongs. WARNING: this value
<b>IS NOT ALWAYS</b> initialized!!! The most common situation is that it is not initialized

param: article An Article object
return: Always true

getArticle()   X-Ref
returns the Article to which this comment belongs, or NULL if it has not been loaded

return: An Article object or NULL if it has not been initialized

getType()   X-Ref

return: Returns the type of this comment, either COMMENT_TYPE_COMMENT or

setType( $type )   X-Ref
sets the comment type

param: type The new type:

getSendNotification()   X-Ref
Pas de description

setSendNotification( $sendNotification )   X-Ref
Pas de description

getBlogId()   X-Ref
Pas de description

setBlogId( $blogId )   X-Ref
Pas de description

getUrl()   X-Ref
Alais for getUrl()

Returns the permalink of the post that sent the trackback link.

return: A string with the permalink.

getTitle()   X-Ref
Alias for getTopic()

Returns the value of the title parameter, as in the trackback ping request. According to the definition
of the trackback ping specification, it can be empty.

return: The title of the entry.

getExcerpt()   X-Ref
Alias for getText(), which is only used by trackbacks.

According to the specification of the trackback protocol, the excerpt is a short string giving
more information about the entry related to the ping. Normally, it will be at most, the first 255
characters of the entry, but it could also be empty since it is not mandatory.

return: A string representing the excerpt.

getBlogName()   X-Ref
Alias for getUserName()

Returns the name of the blog which sent the trackback ping.

return: A string containing the name of the blog which sent the trackback ping.

getBlogInfo()   X-Ref
Returns the BlogInfo object to which this comment/trackback is linked

param: return A BlogInfo object

setNormalizedText( $normalizedText )   X-Ref
sets the normalized text

param: normalizedText

getNormalizedText()   X-Ref
returns the normalized text

return: the normalized text

setNormalizedTopic( $normalizedTopic )   X-Ref
sets the normalized topic

param: normalizedText

getNormalizedTopic()   X-Ref
returns the normalized text

return: the normalized text

IsPosterAuthenticated()   X-Ref
Returns true if this comment was posted by an authenticated user

return: True if poster was authenticated or false otherwise

getUser()   X-Ref
Returns the UserInfo object of the user who posted this comment or false if the comment
wasn't posted by an authenticated user or if the user does not exist anymore

return: An UserInfo object or false if the user doesn't exist anymore or poster was not

getUserId()   X-Ref
Returns the id of the user who posted this comment, or '0' if the comment was
posted by a non-authenticated user

return: Id of the user who posted this comment, '0' if the comment was posted

setUserId( $id )   X-Ref
Sets the user id of the user who posted this comment

param: id The user id of the poster, or 0 if the comment was posted by

setUser( $userInfo )   X-Ref
Sets the UserInfo object containing information about the user who posted this
comment.

param: userInfo A UserInfo 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