PHP Класс Frontend\Modules\Blog\Engine\Model

Наследование: implements Frontend\Modules\Tags\Engine\TagsInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
get ( string $url ) : array Get an item
getAll ( integer $limit = 10, integer $offset ) : array Get all items (at least a chunk)
getAllCategories ( ) : array Get all categories used
getAllComments ( integer $limit = 10, integer $offset ) : array Get all comments (at least a chunk)
getAllCount ( ) : integer Get the number of items
getAllForCategory ( string $categoryURL, integer $limit = 10, integer $offset ) : array Get all items in a category (at least a chunk)
getAllForCategoryCount ( string $url ) : integer Get the number of items in a given category
getAllForDateRange ( integer $start, integer $end, integer $limit = 10, integer $offset ) : array Get all items between a start and end-date
getAllForDateRangeCount ( integer $start, integer $end ) : integer Get the number of items in a date range
getArchiveNumbers ( ) : array Get the statistics for the archive
getComments ( integer $id ) : array Get the comments for an item
getForTags ( array $ids ) : array Fetch the list of tags for a list of items
getIdForTags ( Url $url ) : integer Get the id of an item by the full URL of the current page.
getNavigation ( integer $id ) : array Get an array with the previous and the next post
getRecentComments ( integer $limit = 5 ) : array Get recent comments
getRelated ( integer $id, integer $limit = 5 ) : array Get related items based on tags
getRevision ( string $url, integer $revision ) : array Get a revision for an item
insertComment ( array $comment ) : integer Inserts a new comment
isModerated ( string $author, string $email ) : boolean Get moderation status for an author
notifyAdmin ( array $comment ) Notify the admin
search ( array $ids ) : array Parse the search results for this module

Описание методов

get() публичный статический Метод

Get an item
public static get ( string $url ) : array
$url string The URL for the item.
Результат array

getAll() публичный статический Метод

Get all items (at least a chunk)
public static getAll ( integer $limit = 10, integer $offset ) : array
$limit integer The number of items to get.
$offset integer The offset.
Результат array

getAllCategories() публичный статический Метод

Get all categories used
public static getAllCategories ( ) : array
Результат array

getAllComments() публичный статический Метод

Get all comments (at least a chunk)
public static getAllComments ( integer $limit = 10, integer $offset ) : array
$limit integer The number of items to get.
$offset integer The offset.
Результат array

getAllCount() публичный статический Метод

Get the number of items
public static getAllCount ( ) : integer
Результат integer

getAllForCategory() публичный статический Метод

Get all items in a category (at least a chunk)
public static getAllForCategory ( string $categoryURL, integer $limit = 10, integer $offset ) : array
$categoryURL string The URL of the category to retrieve the posts for.
$limit integer The number of items to get.
$offset integer The offset.
Результат array

getAllForCategoryCount() публичный статический Метод

Get the number of items in a given category
public static getAllForCategoryCount ( string $url ) : integer
$url string The URL for the category.
Результат integer

getAllForDateRange() публичный статический Метод

Get all items between a start and end-date
public static getAllForDateRange ( integer $start, integer $end, integer $limit = 10, integer $offset ) : array
$start integer The start date as a UNIX-timestamp.
$end integer The end date as a UNIX-timestamp.
$limit integer The number of items to get.
$offset integer The offset.
Результат array

getAllForDateRangeCount() публичный статический Метод

Get the number of items in a date range
public static getAllForDateRangeCount ( integer $start, integer $end ) : integer
$start integer The start date as a UNIX-timestamp.
$end integer The end date as a UNIX-timestamp.
Результат integer

getArchiveNumbers() публичный статический Метод

Get the statistics for the archive
public static getArchiveNumbers ( ) : array
Результат array

getComments() публичный статический Метод

Get the comments for an item
public static getComments ( integer $id ) : array
$id integer The ID of the item to get the comments for.
Результат array

getForTags() публичный статический Метод

Fetch the list of tags for a list of items
public static getForTags ( array $ids ) : array
$ids array The ids of the items to grab.
Результат array

getIdForTags() публичный статический Метод

Selects the proper part of the full URL to get the item's id from the database.
public static getIdForTags ( Url $url ) : integer
$url Frontend\Core\Engine\Url The current URL.
Результат integer

getNavigation() публичный статический Метод

Get an array with the previous and the next post
public static getNavigation ( integer $id ) : array
$id integer The id of the current item.
Результат array

getRecentComments() публичный статический Метод

Get recent comments
public static getRecentComments ( integer $limit = 5 ) : array
$limit integer The number of comments to get.
Результат array

getRelated() публичный статический Метод

Get related items based on tags
public static getRelated ( integer $id, integer $limit = 5 ) : array
$id integer The id of the item to get related items for.
$limit integer The maximum number of items to retrieve.
Результат array

getRevision() публичный статический Метод

Get a revision for an item
public static getRevision ( string $url, integer $revision ) : array
$url string The URL for the item to get.
$revision integer The revisionID.
Результат array

insertComment() публичный статический Метод

Inserts a new comment
public static insertComment ( array $comment ) : integer
$comment array The comment to add.
Результат integer

isModerated() публичный статический Метод

Get moderation status for an author
public static isModerated ( string $author, string $email ) : boolean
$author string The name for the author.
$email string The email address for the author.
Результат boolean

notifyAdmin() публичный статический Метод

Notify the admin
public static notifyAdmin ( array $comment )
$comment array The comment that was submitted.