Method | Description | |
---|---|---|
buildURL ( $dataArray, $baseURL ) | build GET URL by data array and base url | |
findCommentInDB ( $aComment, $postID ) | ||
getContents_curl ( $aUrl ) | execute GET function using cURL, return JSON | |
getInstance ( ) | return the single instance of this class | |
sync2Changyan ( $isSetup = false ) | #region 'Synchronize to Changyan' | |
sync2Wordpress ( ) |
Method | Description | |
---|---|---|
__clone ( ) | ||
__construct ( ) | ||
cmtAscend ( $x, $y ) | This is a comparation function used by usort in function insertComments() | |
cmtDescend ( $x, $y ) | This is a comparation function used by usort in function insertComments() | |
getCommentList_curl ( $appID, $aPostID ) | return Array | |
getOption ( $option ) | #endregion | |
insertComments ( $cmts, $postID ) : integer | get comment information object generated by changyan server | |
isCommentExits ( $post_id, $comment_author, $comment_content, $date_gmt ) | to check if this comment is in the wpdb | |
postContents_curl ( $aUrl, $aCommentsArray, $headerPart = [] ) | execute POST function using cURL and return JSON array containing comment_ids in Changyan | |
setOption ( $option, $value ) |
public buildURL ( $dataArray, $baseURL ) |
public getContents_curl ( $aUrl ) |
public static getInstance ( ) |
public sync2Changyan ( $isSetup = false ) |