PHP Class Frontend\Modules\Blog\Engine\Model

Inheritance: implements Frontend\Modules\Tags\Engine\TagsInterface
Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

get() public static méthode

Get an item
public static get ( string $url ) : array
$url string The URL for the item.
Résultat array

getAll() public static méthode

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.
Résultat array

getAllCategories() public static méthode

Get all categories used
public static getAllCategories ( ) : array
Résultat array

getAllComments() public static méthode

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.
Résultat array

getAllCount() public static méthode

Get the number of items
public static getAllCount ( ) : integer
Résultat integer

getAllForCategory() public static méthode

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.
Résultat array

getAllForCategoryCount() public static méthode

Get the number of items in a given category
public static getAllForCategoryCount ( string $url ) : integer
$url string The URL for the category.
Résultat integer

getAllForDateRange() public static méthode

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.
Résultat array

getAllForDateRangeCount() public static méthode

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.
Résultat integer

getArchiveNumbers() public static méthode

Get the statistics for the archive
public static getArchiveNumbers ( ) : array
Résultat array

getComments() public static méthode

Get the comments for an item
public static getComments ( integer $id ) : array
$id integer The ID of the item to get the comments for.
Résultat array

getForTags() public static méthode

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.
Résultat array

getIdForTags() public static méthode

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.
Résultat integer

getNavigation() public static méthode

Get an array with the previous and the next post
public static getNavigation ( integer $id ) : array
$id integer The id of the current item.
Résultat array

getRecentComments() public static méthode

Get recent comments
public static getRecentComments ( integer $limit = 5 ) : array
$limit integer The number of comments to get.
Résultat array

getRelated() public static méthode

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.
Résultat array

getRevision() public static méthode

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.
Résultat array

insertComment() public static méthode

Inserts a new comment
public static insertComment ( array $comment ) : integer
$comment array The comment to add.
Résultat integer

isModerated() public static méthode

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.
Résultat boolean

notifyAdmin() public static méthode

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