PHP 클래스 Trean_Bookmarks, horde

저자: Ben Chavet ([email protected])
저자: Chuck Hagenbuch ([email protected])
저자: Michael J Rubinsky ([email protected])
파일 보기 프로젝트 열기: horde/horde

보호된 프로퍼티들

프로퍼티 타입 설명
$_userId integer
$_userManager Content_Users_Manager

공개 메소드들

메소드 설명
__construct ( Content_Users_Manager $userManager ) Constructor.
countBookmarks ( ) : integer Returns the number of bookmarks.
getBookmark ( integer $id ) : Trean_Bookmark Returns the bookmark corresponding to the given id.
getBookmarks ( array $ids, array $options = [] ) : array Returns the bookmarks corresponding to the given ids.
groupBookmarks ( string $groupby ) : array Return counts on grouping bookmarks by a specific property.
listBookmarks ( $sortby = 'title', integer $sortdir, integer $from, $count, string $userId = null ) : array List bookmarks, sorted and paged as specified.
newBookmark ( array $properties, boolean $crawl = true ) : Trean_Bookmark Create a new bookmark for the current user.
removeBookmark ( Trean_Bookmark $bookmark ) Removes a Trean_Bookmark from the backend.
searchBookmarks ( string $q ) : array Search bookmarks.

보호된 메소드들

메소드 설명
_resultSet ( array $bookmarks ) : array Creates Trean_Bookmark objects for each row in a SQL result.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Content_Users_Manager $userManager )
$userManager Content_Users_Manager

_resultSet() 보호된 메소드

Creates Trean_Bookmark objects for each row in a SQL result.
protected _resultSet ( array $bookmarks ) : array
$bookmarks array An array of query results.
리턴 array An array of Trean_Bookmark objects.

countBookmarks() 공개 메소드

Returns the number of bookmarks.
public countBookmarks ( ) : integer
리턴 integer The number of all bookmarks.

getBookmark() 공개 메소드

Returns the bookmark corresponding to the given id.
public getBookmark ( integer $id ) : Trean_Bookmark
$id integer The ID of the bookmark to retrieve.
리턴 Trean_Bookmark The bookmark object corresponding to the given name.

getBookmarks() 공개 메소드

Returns the bookmarks corresponding to the given ids.
부터: 1.2.0
public getBookmarks ( array $ids, array $options = [] ) : array
$ids array
$options array An array of options: - sortby: (string) The field to sort by. DEFAULT: No sorting is done. - sortdir: (integer) The direction to sort, if sorting.
리턴 array An array of Trean_Bookmark objects.

groupBookmarks() 공개 메소드

Return counts on grouping bookmarks by a specific property.
public groupBookmarks ( string $groupby ) : array
$groupby string The field to group on. (i.e., 'status').
리턴 array A hash of results.

listBookmarks() 공개 메소드

List bookmarks, sorted and paged as specified.
public listBookmarks ( $sortby = 'title', integer $sortdir, integer $from, $count, string $userId = null ) : array
$sortdir integer Direction of sort.
$from integer Starting bookmark.
$userId string List bookmarks for this userId. Defaults to $this->_userId.
리턴 array An array of Trean_Bookmark objects.

newBookmark() 공개 메소드

Create a new bookmark for the current user.
public newBookmark ( array $properties, boolean $crawl = true ) : Trean_Bookmark
$properties array The bookmark property array.
$crawl boolean If true (default) attempt to crawl the URL.
리턴 Trean_Bookmark

removeBookmark() 공개 메소드

Removes a Trean_Bookmark from the backend.
public removeBookmark ( Trean_Bookmark $bookmark )
$bookmark Trean_Bookmark The bookmark to remove.

searchBookmarks() 공개 메소드

Search bookmarks.
public searchBookmarks ( string $q ) : array
$q string The search text.
리턴 array An array of Trean_Bookmark objects that match the search.

프로퍼티 상세

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

protected int $_userId
리턴 integer

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

protected Content_Users_Manager $_userManager
리턴 Content_Users_Manager