[ Index ]

PHP Cross Reference of DokuWiki




/inc/ -> Draft.php (summary)

(no description)

File Size: 168 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Draft:: (9 methods):

Class: Draft  - X-Ref

Class Draft

__construct($ID, $client)   X-Ref
Draft constructor.

param: string $ID the page id for this draft
param: string $client the client identification (username or ip or similar) for this draft

getDraftFilename()   X-Ref
Get the filename for this draft (whether or not it exists)

return: string

isDraftAvailable()   X-Ref
Checks if this draft exists on the filesystem

return: bool

saveDraft()   X-Ref
Save a draft of a current edit session

The draft will not be saved if
- drafts are deactivated in the config
- or the editarea is empty and there are no event handlers registered
- or the event is prevented

return: bool whether has the draft been saved
triggers: DRAFT_SAVE

getDraftText()   X-Ref
Get the text from the draft file

return: string

deleteDraft()   X-Ref
Remove the draft from the filesystem

Also sets $INFO['draft'] to null

getDraftMessage()   X-Ref
Get a formatted message stating when the draft was saved

return: string

getErrors()   X-Ref
Retrieve the errors that occured when saving the draft

return: array

getDraftDate()   X-Ref
Get the timestamp when this draft was saved

return: int