PHP 클래스 PrivateBin\Model\Paste

Model of a PrivateBin paste.
상속: extends AbstractModel
파일 보기 프로젝트 열기: privatebin/privatebin 1 사용 예제들

공개 메소드들

메소드 설명
delete ( ) : void Delete the paste.
exists ( ) : boolean Test if paste exists in store.
get ( ) : stdClass Get paste data.
getComment ( string $parentId, string $commentId = null ) : Comment Get a comment, optionally a specific instance.
getComments ( ) : array Get all comments, if any.
getDeleteToken ( ) : string Generate the "delete" token.
isBurnafterreading ( ) : boolean Check if paste is of burn-after-reading type.
isOpendiscussion ( ) : boolean Check if paste has discussions enabled.
setAttachment ( string $attachment ) : void Set paste's attachment.
setAttachmentName ( string $attachmentname ) : void Set paste's attachment name.
setBurnafterreading ( string $burnafterreading = '1' ) : void Set paste's burn-after-reading type.
setExpiration ( string $expiration ) : void Set paste expiration.
setFormatter ( string $format ) : void Set paste's format.
setOpendiscussion ( string $opendiscussion = '1' ) : void Set paste's discussion state.
store ( ) : void Store the paste's data.

메소드 상세

delete() 공개 메소드

Delete the paste.
public delete ( ) : void
리턴 void

exists() 공개 메소드

Test if paste exists in store.
public exists ( ) : boolean
리턴 boolean

get() 공개 메소드

Get paste data.
public get ( ) : stdClass
리턴 stdClass

getComment() 공개 메소드

Get a comment, optionally a specific instance.
public getComment ( string $parentId, string $commentId = null ) : Comment
$parentId string
$commentId string
리턴 Comment

getComments() 공개 메소드

Get all comments, if any.
public getComments ( ) : array
리턴 array

getDeleteToken() 공개 메소드

The token is the hmac of the pastes ID signed with the server salt. The paste can be deleted by calling: http://example.com/privatebin/?pasteid=&deletetoken=
public getDeleteToken ( ) : string
리턴 string

isBurnafterreading() 공개 메소드

Check if paste is of burn-after-reading type.
public isBurnafterreading ( ) : boolean
리턴 boolean

isOpendiscussion() 공개 메소드

Check if paste has discussions enabled.
public isOpendiscussion ( ) : boolean
리턴 boolean

setAttachment() 공개 메소드

Set paste's attachment.
public setAttachment ( string $attachment ) : void
$attachment string
리턴 void

setAttachmentName() 공개 메소드

Set paste's attachment name.
public setAttachmentName ( string $attachmentname ) : void
$attachmentname string
리턴 void

setBurnafterreading() 공개 메소드

Set paste's burn-after-reading type.
public setBurnafterreading ( string $burnafterreading = '1' ) : void
$burnafterreading string
리턴 void

setExpiration() 공개 메소드

Set paste expiration.
public setExpiration ( string $expiration ) : void
$expiration string
리턴 void

setFormatter() 공개 메소드

Set paste's format.
public setFormatter ( string $format ) : void
$format string
리턴 void

setOpendiscussion() 공개 메소드

Set paste's discussion state.
public setOpendiscussion ( string $opendiscussion = '1' ) : void
$opendiscussion string
리턴 void

store() 공개 메소드

Store the paste's data.
public store ( ) : void
리턴 void