PHP 클래스 PrivateBin\Data\Filesystem

Model for filesystem data access, implemented as a singleton.
상속: extends AbstractData
파일 보기 프로젝트 열기: privatebin/privatebin

공개 메소드들

메소드 설명
create ( string $pasteid, array $paste ) : boolean Create a paste.
createComment ( string $pasteid, string $parentid, string $commentid, array $comment ) : boolean Create a comment in a paste.
delete ( string $pasteid ) : void Delete a paste and its discussion.
exists ( string $pasteid ) : boolean Test if a paste exists.
existsComment ( string $pasteid, string $parentid, string $commentid ) : boolean Test if a comment exists.
getInstance ( array $options = null ) : Filesystem get instance of singleton
read ( string $pasteid ) : stdClass | false Read a paste.
readComments ( string $pasteid ) : array Read all comments of paste.

보호된 메소드들

메소드 설명
_getExpiredPastes ( integer $batchsize ) : array Returns up to batch size number of paste ids that have expired

비공개 메소드들

메소드 설명
_dataid2discussionpath ( string $dataid ) : string Convert paste id to discussion storage path.
_dataid2path ( string $dataid ) : string Convert paste id to storage path.
_init ( ) : void initialize privatebin
_isFirstLevelDir ( string $element ) : boolean Check that the given element is a valid first level directory.
_isSecondLevelDir ( string $element ) : boolean Check that the given element is a valid second level directory.

메소드 상세

_getExpiredPastes() 보호된 메소드

Returns up to batch size number of paste ids that have expired
protected _getExpiredPastes ( integer $batchsize ) : array
$batchsize integer
리턴 array

create() 공개 메소드

Create a paste.
public create ( string $pasteid, array $paste ) : boolean
$pasteid string
$paste array
리턴 boolean

createComment() 공개 메소드

Create a comment in a paste.
public createComment ( string $pasteid, string $parentid, string $commentid, array $comment ) : boolean
$pasteid string
$parentid string
$commentid string
$comment array
리턴 boolean

delete() 공개 메소드

Delete a paste and its discussion.
public delete ( string $pasteid ) : void
$pasteid string
리턴 void

exists() 공개 메소드

Test if a paste exists.
public exists ( string $pasteid ) : boolean
$pasteid string
리턴 boolean

existsComment() 공개 메소드

Test if a comment exists.
public existsComment ( string $pasteid, string $parentid, string $commentid ) : boolean
$pasteid string
$parentid string
$commentid string
리턴 boolean

getInstance() 공개 정적인 메소드

get instance of singleton
public static getInstance ( array $options = null ) : Filesystem
$options array
리턴 Filesystem

read() 공개 메소드

Read a paste.
public read ( string $pasteid ) : stdClass | false
$pasteid string
리턴 stdClass | false

readComments() 공개 메소드

Read all comments of paste.
public readComments ( string $pasteid ) : array
$pasteid string
리턴 array