API Class

class Nos\Comments\Api
Nos\Comments\Api::__construct($config)
Parameters:
  • $config (array) – API configuration
Nos\Comments\Api::addComment($data)
Parameters:
  • $data (array) –
    ismm:Must be equal to anti_spam_identifier.passed of the comments API configuration.
    id:Id of the item on which the comment was post
    comm_email:Email of the commenter
    comm_author:Name of the commenter
    comm_content:Content of the comment
    subscribe_to_comments:
     True if the commenter accept to receive new comments by email
    recaptcha_challenge_field:
     The content of recaptcha challenge field
    recaptcha_response_field:
     The content of recaptcha response field
Returns:

True if comment is added, false if not passed recaptcha, ‘none’ if not passed anti spam.

Nos\Comments\Api::sendNewCommentToAuthor(Model_Comment $comment)
Parameters:
  • $comment (Model_Comment) – The new comment
Nos\Comments\Api::sendNewCommentToCommenters(Model_Comment $comment)
Parameters:
  • $comment (Model_Comment) – The new comment
Nos\Comments\Api::getConfig()
Returns:the API configuration.
Nos\Comments\Api::getRssComment($comment)
Parameters:
  • $comment – Comment item
Returns:

An array (to be used with Nos\Tools_RSS)

Nos\Comments\Api::getRss($options = array())
Parameters:
  • $options (array) –

    If no key item, returns all comments of the model for the current context.

    item:A Nos\Orm\Model instance. If set, returns all comments of the item.
Returns:

A Nos\Tools_RSS instance.

Nos\Comments\Api::changeSubscriptionStatus($from, $email, $subscribe)
Parameters:
  • $from (string) – A Nos\Orm\Model instance
  • $email (string) – Email of the commenter to change the subscription status
  • $subscribe (boolean) – New subscription status (true to receive notifications, false to disable)
Read the Docs v: elche
Versions
latest
stable
elche
dubrovka
chiba.2
chiba.1
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.