PHP Class GBCommentDB, gitblog

Inheritance: extends JSONStore
ファイルを表示 Open project: rsms/gitblog Class Usage Examples

Public Properties

Property Type Description
$autocommitToRepo
$autocommitToRepoMessage
$lastComment
$post

Public Methods

Method Description
__construct ( $file = '/dev/null', $post = null, $skeleton_file = null, $createmode = 432, $autocommit = true, $pretty_output = true )
append ( GBComment $comment, $index = null, $skipDuplicate = true )
commit ( )
encodeData ( )
get ( $index = null )
parseData ( )
remove ( $index )
resolveIndexPath ( $indexpath, $comment, $skipIfSameAsComment = null )
rollback ( $strict = true )
set ( $index, GBComment $comment = null ) Set or remove a comment.

Protected Methods

Method Description
txWriteData ( )

Method Details

__construct() public method

public __construct ( $file = '/dev/null', $post = null, $skeleton_file = null, $createmode = 432, $autocommit = true, $pretty_output = true )

append() public method

public append ( GBComment $comment, $index = null, $skipDuplicate = true )
$comment GBComment

commit() public method

public commit ( )

encodeData() public method

public encodeData ( )

get() public method

public get ( $index = null )

parseData() public method

public parseData ( )

remove() public method

public remove ( $index )

resolveIndexPath() public method

public resolveIndexPath ( $indexpath, $comment, $skipIfSameAsComment = null )

rollback() public method

public rollback ( $strict = true )

set() public method

By not passing the second argument the action will be to remove a comment rather than setting it to null. You can also pass an array as the first and only argument in which case the whole underlying data set is replaced. You have been warned. Return values: - After a set operation, true is returned on success, otherwise false. - After a remove operation, the removed comment is returned (if found and removed), otherwise false.
public set ( $index, GBComment $comment = null )
$comment GBComment

txWriteData() protected method

protected txWriteData ( )

Property Details

$autocommitToRepo public_oe property

public $autocommitToRepo

$autocommitToRepoMessage public_oe property

public $autocommitToRepoMessage

$lastComment public_oe property

public $lastComment

$post public_oe property

public $post