PHP 클래스 Wicked_Driver_Sql, horde

저자: Tyler Colbert ([email protected])
저자: Chuck Hagenbuch ([email protected])
저자: Jan Schneider ([email protected])
상속: extends Wicked_Driver
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_db Horde_Db_Adapter Handle for the current database connection.
$_pageNames array A cached list of all available page names.

공개 메소드들

메소드 설명
__construct ( array $params = [] ) Constructor.
getAllPages ( )
getAttachedFiles ( string $pageId, boolean $allversions = false ) : array Retrieves data on files attached to a page.
getBackLinks ( $pagename )
getCharset ( ) : string Returns the charset used by the backend.
getHistory ( $pagename )
getLikePages ( $pagename )
getMatchingPages ( $searchtext, $matchType = Wicked_Page::MATCH_ANY )
getPageById ( $id )
getPages ( $special = true, $no_cache = false )
getRecentChanges ( integer $days = 3 ) : array Returns the most recently changed pages.
leastPopular ( integer $limit = 10 ) : array Returns the least popular pages.
logAttachmentDownload ( integer $pageid, string $attachment ) Logs an attachment download.
logPageView ( string $pagename ) Logs a page view.
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.
removeAllAttachments ( integer $pageId ) Removes all attachments from a page.
removeAllVersions ( $pagename )
removeAttachment ( integer $pageId, string $attachment, string $version = null ) Removes a single version or all versions of an attachment from $pageId.
removeVersion ( $pagename, $version )
renamePage ( string $pagename, string $newname ) Renames a page, keeping the page's history.
retrieveByName ( string $pagename ) : array Retrieves the page of a particular name from the database.
retrieveHistory ( string $pagename, string $version ) : array Retrieves a historic version of a page.
searchText ( string $searchtext, boolean $title = true ) : array Finds pages with matches in text or title.
searchTitles ( string $searchtext, boolean $begin = false ) : array Finds pages with matches in the title.
updateText ( $pagename, $text, $changelog )

보호된 메소드들

메소드 설명
_attachFile ( array $file ) : integer Handles the driver-specific portion of attaching a file.
_convertFromDriver ( mixed $value ) : mixed Converts a value from the driver's charset to the default charset.
_convertToDriver ( mixed $value ) : mixed Converts a value from the default charset to the driver's charset.
_retrieve ( string $table, array | string $where, string $orderBy = null, integer $limit = null ) : array Retrieves a set of pages matching an SQL WHERE clause.

메소드 상세

__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.
protected _attachFile ( array $file ) : integer
$file array See Wicked_Driver::attachFile().
리턴 integer The new version of the file attached.

_convertFromDriver() 보호된 메소드

Converts a value from the driver's charset to the default charset.
protected _convertFromDriver ( mixed $value ) : mixed
$value mixed A value to convert.
리턴 mixed The converted value.

_convertToDriver() 보호된 메소드

Converts a value from the default charset to the driver's charset.
protected _convertToDriver ( mixed $value ) : mixed
$value mixed A value to convert.
리턴 mixed The converted value.

_retrieve() 보호된 메소드

Retrieves a set of pages matching an SQL WHERE clause.
protected _retrieve ( string $table, array | string $where, string $orderBy = null, integer $limit = null ) : array
$table string Table to retrieve pages from.
$where array | string Where clause for sql statement (without the 'WHERE'). If an array the 1st element is the clause with placeholder, the 2nd element the values.
$orderBy string Order results by this column.
$limit integer Maximum number of pages to fetch.
리턴 array A list of page hashes.

getAllPages() 공개 메소드

public getAllPages ( )

getAttachedFiles() 공개 메소드

Retrieves data on files attached to a page.
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.

getCharset() 공개 메소드

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

getHistory() 공개 메소드

public getHistory ( $pagename )

getLikePages() 공개 메소드

public getLikePages ( $pagename )

getMatchingPages() 공개 메소드

public getMatchingPages ( $searchtext, $matchType = Wicked_Page::MATCH_ANY )

getPageById() 공개 메소드

public getPageById ( $id )

getPages() 공개 메소드

public getPages ( $special = true, $no_cache = false )

getRecentChanges() 공개 메소드

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

leastPopular() 공개 메소드

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

logAttachmentDownload() 공개 메소드

Logs an attachment download.
public logAttachmentDownload ( integer $pageid, string $attachment )
$pageid integer The page with the attachment.
$attachment string The attachment name.

logPageView() 공개 메소드

Logs a page view.
public logPageView ( string $pagename )
$pagename string The page that was viewed.

mostPopular() 공개 메소드

Returns the most popular pages.
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.
public mostRecent ( integer $limit = 10 ) : array
$limit integer The number of most recent pages to return.
리턴 array Pages.

newPage() 공개 메소드

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

removeAllAttachments() 공개 메소드

Removes all attachments from a page.
public removeAllAttachments ( integer $pageId )
$pageId integer A page ID.

removeAllVersions() 공개 메소드

public removeAllVersions ( $pagename )

removeAttachment() 공개 메소드

Removes a single version or all versions of an attachment from $pageId.
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() 공개 메소드

public removeVersion ( $pagename, $version )

renamePage() 공개 메소드

Renames a page, keeping the page's history.
public renamePage ( string $pagename, string $newname )
$pagename string The name of the page to rename.
$newname string The page's new name.

retrieveByName() 공개 메소드

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

retrieveHistory() 공개 메소드

Retrieves a historic version of a page.
public retrieveHistory ( string $pagename, string $version ) : array
$pagename string The name of the page to retrieve.
$version string The version to retrieve.
리턴 array The page hash.

searchText() 공개 메소드

Finds pages with matches in text or title.
public searchText ( string $searchtext, boolean $title = true ) : array
$searchtext string The search expression (Google-like).
$title boolean Search both page title and text?
리턴 array A list of pages.

searchTitles() 공개 메소드

Finds pages with matches in the title.
public searchTitles ( string $searchtext, boolean $begin = false ) : array
$searchtext string The search expression (Google-like).
$begin boolean Search only at the begin of the titles?
리턴 array A list of pages.

updateText() 공개 메소드

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

프로퍼티 상세

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

Handle for the current database connection.
protected Horde_Db_Adapter $_db
리턴 Horde_Db_Adapter

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

A cached list of all available page names.
protected array $_pageNames
리턴 array