PHP Класс Trean_Bookmarks, horde

Автор: Ben Chavet ([email protected])
Автор: Chuck Hagenbuch ([email protected])
Автор: Michael J Rubinsky ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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