메소드 | 설명 | |
---|---|---|
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 ( ) |
메소드 | 설명 | |
---|---|---|
__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 getContents_curl ( $aUrl ) |