\Oxws_Reviews

Functions related to reviews

Summary

Methods
Properties
Constants
getConfig()
getDb()
fetchArticleReviews()
fetchReviewByOxid()
fetchAllReviews()
insertArticleReview()
updateArticleReview()
deleteArticleReviews()
deleteArticlesReviews()
deleteReview()
deleteReviews()
No public properties found
No constants found
No protected methods found
$myConfig
$oDb
N/A
No private methods found
No private properties found
N/A

Properties

$myConfig

$myConfig : object

Config object

Type

object

$oDb

$oDb : object

Database object

Type

object

Methods

getConfig()

getConfig() : object

Function to get config object

Returns

object

getDb()

getDb() : object

Function to get database object

Returns

object

fetchArticleReviews()

fetchArticleReviews(string  $articleId = "") : array

Function to fetch all the reviews of an article

Parameters

string $articleId

oxid of the article to fetch reviews

Returns

array

fetchReviewByOxid()

fetchReviewByOxid(string  $reviewId = "") : array

Function to fetch review based on review oxid from oxreviews table

Parameters

string $reviewId

oxid of the review to fetch review details

Returns

array

fetchAllReviews()

fetchAllReviews() : array

Function to fetch all the reviews of all the articles

Returns

array

insertArticleReview()

insertArticleReview(\JSONstring  $review) : boolean

Function to insert review of an article

Parameters

\JSONstring $review

json string with review details as key=>value pairs to insert. Ex: 'oxobjectid'=>'xxxxxx', 'oxtext'=>'xxxxxx'.

Returns

boolean

updateArticleReview()

updateArticleReview(\JSONstring  $review) : boolean

Function to update review of an article

Parameters

\JSONstring $review

json string with review details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxtext'=>'xxxxxx'.

Returns

boolean

deleteArticleReviews()

deleteArticleReviews(string  $articleId = "") : boolean

Function to delete a reviews of an article based on article oxid

Parameters

string $articleId

oxid of the article to delete reviews.

Returns

boolean

deleteArticlesReviews()

deleteArticlesReviews(array  $articleIds) : null

Function to delete reviews of multiple articles based on oxid of the articles

Parameters

array $articleIds

array of oxids of the articles to delete reviews.

Returns

null

deleteReview()

deleteReview(string  $reviewId = "") : boolean

Function to delete a review based on review oxid

Parameters

string $reviewId

oxid of the review to be deleted

Returns

boolean

deleteReviews()

deleteReviews(array  $reviewIds) : null

Function to delete multiple reviews based on oxid of the reviews

Parameters

array $reviewIds

array of oxids of the reviews to be deleted

Returns

null