PHP 클래스 Wicked_Driver, horde

저자: Tyler Colbert ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_params array Hash containing connection parameters.
$_vfs VFS VFS object for storing attachments.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
attachFile ( array $file, string $data ) Attaches a file to a page or update an attachment.
getAllPages ( )
getAttachedFiles ( string $pageId, boolean $allversions = false ) : array Retrieves data on files attached to a page.
getAttachmentContents ( string $pageId, string $filename, string $version ) : string Retrieves the contents of an attachment.
getBackLinks ( $pagename )
getCharset ( ) : string Returns the charset used by the backend.
getHistory ( $pagename )
getLikePages ( $pagename )
getPage ( $pagename )
getPageById ( $id )
getPageId ( $pagename )
getPages ( $special = true )
getRecentChanges ( integer $days = 3 ) : array Returns the most recently changed pages.
getSpecialPages ( )
getVFS ( ) Accessor to manage a VFS instance.
leastPopular ( integer $limit = 10 ) : array Returns the least popular pages.
logPageView ( string $pagename ) Logs a hit to $pagename.
mostPopular ( integer $limit = 10 ) : array Returns the most popular pages.
mostRecent ( integer $limit = 10 ) : array Returns the most recently changed pages.
newPage ( string $pagename, string $text ) Creates a new page.
pageExists ( $pagename )
removeAllAttachments ( integer $pageId ) Removes all attachments to $pageId from the VFS backend.
removeAllVersions ( $pagename )
removeAttachment ( integer $pageId, string $attachment, string $version = null ) Remove a single version or all versions of an attachment to $pageId from the VFS backend.
removeVersion ( $pagename, $version )
renamePage ( $pagename, $newname )
retrieveByName ( string $pagename ) Retrieves the page of a particular name from the database.
retrieveHistory ( string $pagename, string $version ) Retrieves a historic version of a page.
searchText ( string $searchtext ) : array Finds pages with matches in text or title.
searchTitles ( $searchtext, $begin = false )
updateText ( $pagename, $text, $changelog )

보호된 메소드들

메소드 설명
_attachFile ( array $file ) : boolean Handles the driver-specific portion of attaching a file.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $params = [] )
$params array A hash containing connection parameters.

_attachFile() 추상적인 보호된 메소드

Wicked_Driver::attachFile() calls down to this method for the driver- specific portion, and then uses VFS to store the attachment.
abstract protected _attachFile ( array $file ) : boolean
$file array See Wicked_Driver::attachFile().
리턴 boolean The new version of the file attached

attachFile() 공개 메소드

Attaches a file to a page or update an attachment.
public attachFile ( array $file, string $data )
$file array This is a key/value array describing the attachment:
'page_id' =>          This is the id of the page to which we would
                      like to attach the file.
'attachment_name' =>  This is the filename of the attachment.
'change_log' =>       A change log entry for this attach or update
                      operation.  (Optional)
'change_author' =>    The user uploading this file.  If not present,
                      the currently logged-in user is assumed.
$data string This is the contents of the file to be attached.

getAllPages() 추상적인 공개 메소드

abstract public getAllPages ( )

getAttachedFiles() 추상적인 공개 메소드

Retrieves data on files attached to a page.
abstract public getAttachedFiles ( string $pageId, boolean $allversions = false ) : array
$pageId string This is the Id of the page for which we'd like to find attached files.
$allversions boolean Whether to include all versions. If false or omitted, only the most recent version of each attachment is returned.
리턴 array An array of key/value arrays describing the attached files.

getAttachmentContents() 공개 메소드

Retrieves the contents of an attachment.
public getAttachmentContents ( string $pageId, string $filename, string $version ) : string
$pageId string This is the name of the page to which the file is attached.
$filename string This is the name of the attachment.
$version string This is the version of the attachment.
리턴 string The file's contents.

getCharset() 공개 메소드

Returns the charset used by the backend.
public getCharset ( ) : string
리턴 string The backend's charset

getHistory() 추상적인 공개 메소드

abstract public getHistory ( $pagename )

getLikePages() 추상적인 공개 메소드

abstract public getLikePages ( $pagename )

getPage() 공개 메소드

public getPage ( $pagename )

getPageById() 공개 메소드

public getPageById ( $id )

getPageId() 공개 메소드

public getPageId ( $pagename )

getPages() 공개 메소드

public getPages ( $special = true )

getRecentChanges() 추상적인 공개 메소드

Returns the most recently changed pages.
abstract public getRecentChanges ( integer $days = 3 ) : array
$days integer The number of days to look back.
리턴 array Pages.

getSpecialPages() 공개 메소드

public getSpecialPages ( )

getVFS() 공개 메소드

Accessor to manage a VFS instance.
public getVFS ( )

leastPopular() 추상적인 공개 메소드

Returns the least popular pages.
abstract public leastPopular ( integer $limit = 10 ) : array
$limit integer The number of least popular pages to return.
리턴 array Pages.

logPageView() 추상적인 공개 메소드

Logs a hit to $pagename.
abstract public logPageView ( string $pagename )
$pagename string The page that was viewed.

mostPopular() 추상적인 공개 메소드

Returns the most popular pages.
abstract public mostPopular ( integer $limit = 10 ) : array
$limit integer The number of most popular pages to return.
리턴 array Pages.

mostRecent() 추상적인 공개 메소드

Returns the most recently changed pages.
abstract public mostRecent ( integer $limit = 10 ) : array
$limit integer The number of most recent pages to return.
리턴 array Pages.

newPage() 추상적인 공개 메소드

Creates a new page.
abstract public newPage ( string $pagename, string $text )
$pagename string The new page's name.
$text string The new page's text.

pageExists() 공개 메소드

public pageExists ( $pagename )

removeAllAttachments() 공개 메소드

Removes all attachments to $pageId from the VFS backend.
public removeAllAttachments ( integer $pageId )
$pageId integer The Id of the page to remove attachments from.

removeAllVersions() 공개 메소드

public removeAllVersions ( $pagename )

removeAttachment() 공개 메소드

Remove a single version or all versions of an attachment to $pageId from the VFS backend.
public removeAttachment ( integer $pageId, string $attachment, string $version = null )
$pageId integer The Id of the page the file is attached to.
$attachment string The name of the file.
$version string If specified, the version to delete. If null, then all versions of $attachment will be removed.

removeVersion() 추상적인 공개 메소드

abstract public removeVersion ( $pagename, $version )

renamePage() 추상적인 공개 메소드

abstract public renamePage ( $pagename, $newname )

retrieveByName() 추상적인 공개 메소드

Retrieves the page of a particular name from the database.
abstract public retrieveByName ( string $pagename )
$pagename string The name of the page to retrieve

retrieveHistory() 추상적인 공개 메소드

Retrieves a historic version of a page.
abstract public retrieveHistory ( string $pagename, string $version )
$pagename string The name of the page to retrieve.
$version string The version to retrieve.

searchText() 추상적인 공개 메소드

Finds pages with matches in text or title.
abstract public searchText ( string $searchtext ) : array
$searchtext string The search expression (Google-like).
리턴 array A list of pages

searchTitles() 추상적인 공개 메소드

abstract public searchTitles ( $searchtext, $begin = false )

updateText() 추상적인 공개 메소드

abstract public updateText ( $pagename, $text, $changelog )

프로퍼티 상세

$_params 보호되어 있는 프로퍼티

Hash containing connection parameters.
protected array $_params
리턴 array

$_vfs 보호되어 있는 프로퍼티

VFS object for storing attachments.
protected VFS $_vfs
리턴 VFS