PHP Класс Airship\Cabin\Hull\Blueprint\Blog

Read-only access to blog posts, etc. Create comments.
Наследование: extends BlueprintGear
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$defaultSeparator Break after this token.

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

Метод Описание
addCommentToPost ( array $post, integer $blogPostId, boolean $published = false ) : boolean Adds a new comment to a blog post
checkCommentReplyTo ( integer $replyTo, integer $blogPostId ) : mixed Make sure we aren't replying to a comment on a different blog post
countByAuthor ( integer $authorId ) : integer Return an array of the most $num recent posts, including URL and title
countByCategories ( array $categories = [] ) : integer Return an array of the most $num recent posts, including URL and title
countByMonth ( string $year, string $month ) : integer Return an array of the most $num recent posts, including URL and title
countBySeries ( integer $seriesId ) : integer How many items are in this series?
countByTag ( integer $tag ) : integer Return an array of the most $num recent posts, including URL and title
countByYear ( string $year ) : integer Return an array of the most $num recent posts, including URL and title
countSeries ( ) : integer How many items are in this series?
expandCategory ( integer $category_id, integer $depth ) : array Expand a category to include all subcategories
getAuthor ( integer $authorId ) : array Return information about the current category
getAuthorBySlug ( string $authorSlug ) : array Return information about the current category
getAuthorsForUser ( integer $userId ) : array Get all of the authors available for this user to post under
getBlogMenu ( ) : array Gets the data necessary for the side menu on blog pages
getBlogPost ( string $year, string $month, string $slug ) : array Get a specific blog post
getBlogPostById ( integer $id ) : array Get a specific blog post by its row ID
getBlogPostByUniqueId ( string $uniqueID ) : array Given a unique ID (shorturl), return the blog post.
getBlogPostUniqueId ( integer $postID ) : string Given a blog post ID, just get the unique ID (shorturl)
getCategory ( string $slug ) : array Return information about the current category
getCategoryTree ( integer $parent ) : array Get all subcategories for a given category (defaults to root)
getCommentCache ( ) : CacheInterface Returns the cache container for blog comments:
getCommentDepth ( integer $commentId ) : integer
getCommentTree ( integer $blogPostId ) : array Get all of the blog comments for a given blog post
getCommentWithChildren ( integer $commentId ) : array Get a comment (and all of its replies)
getParentSeries ( integer $seriesId, array $seenIds = [], integer $depth ) : array Get all of the parent series that a series belongs to.
getPostTags ( integer $postId ) : array Get all of the tags for a particular post
getPostsSeries ( integer $postId ) : array Get all of the series' that this post belongs to:
getSeriesById ( integer $id ) : array Get information about a series
getSeriesForPost ( integer $postId ) : array Get all the series that a given post belongs to.
getSeriesInfo ( string $slug ) : array Get information about a series
getSnippet ( array $post, boolean $after = false ) : array Get a preview snippet of a blog post
getTag ( string $slug ) : array Return information about the current tag
getTagCloud ( ) : array Get $num of the most popular tags, paginated to start at $offset
getTags ( integer $num = 10, integer $offset ) : array Get $num of the most popular tags, paginated to start at $offset
listAllPublic ( ) : array Return all blog posts
listBaseSeries ( integer $num = 20, integer $offset ) : array Get all of the base series
listByAuthor ( integer $authorId, integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title
listByCategories ( array $categories = [], integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title
listByMonth ( string $year, string $month, integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title
listBySeries ( integer $seriesId, integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title
listByTag ( integer $tagId, integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title
listByYear ( string $year, integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title
longURL ( string $shortURL = '' ) : string Get the long URL for a given short URL
recentFullPosts ( integer $num = 20, integer $offset ) : array Return an array of the most $num recent posts, including URL and title

Защищенные методы

Метод Описание
getSeriesExtra ( array $ser ) : array Get extra data
getSeriesLink ( integer $series, integer $listOrder, string $which = 'curr' ) : string
getSeriesRecursive ( integer $seriesId, array $seen = [], integer $depth ) : array Recursively acquire parent series IDs into a flat array
postProcess ( array $post = [] ) : array Blog post database retrieval post-processing - D.R.Y.

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

addCommentToPost() публичный метод

Adds a new comment to a blog post
public addCommentToPost ( array $post, integer $blogPostId, boolean $published = false ) : boolean
$post array
$blogPostId integer
$published boolean
Результат boolean

checkCommentReplyTo() публичный метод

Make sure we aren't replying to a comment on a different blog post
public checkCommentReplyTo ( integer $replyTo, integer $blogPostId ) : mixed
$replyTo integer
$blogPostId integer
Результат mixed

countByAuthor() публичный метод

Return an array of the most $num recent posts, including URL and title
public countByAuthor ( integer $authorId ) : integer
$authorId integer
Результат integer

countByCategories() публичный метод

Return an array of the most $num recent posts, including URL and title
public countByCategories ( array $categories = [] ) : integer
$categories array
Результат integer

countByMonth() публичный метод

Return an array of the most $num recent posts, including URL and title
public countByMonth ( string $year, string $month ) : integer
$year string
$month string
Результат integer

countBySeries() публичный метод

How many items are in this series?
public countBySeries ( integer $seriesId ) : integer
$seriesId integer
Результат integer

countByTag() публичный метод

Return an array of the most $num recent posts, including URL and title
public countByTag ( integer $tag ) : integer
$tag integer
Результат integer

countByYear() публичный метод

Return an array of the most $num recent posts, including URL and title
public countByYear ( string $year ) : integer
$year string
Результат integer

countSeries() публичный метод

How many items are in this series?
public countSeries ( ) : integer
Результат integer

expandCategory() публичный метод

Expand a category to include all subcategories
public expandCategory ( integer $category_id, integer $depth ) : array
$category_id integer
$depth integer
Результат array

getAuthor() публичный метод

Return information about the current category
public getAuthor ( integer $authorId ) : array
$authorId integer
Результат array

getAuthorBySlug() публичный метод

Return information about the current category
public getAuthorBySlug ( string $authorSlug ) : array
$authorSlug string
Результат array

getAuthorsForUser() публичный метод

Get all of the authors available for this user to post under
public getAuthorsForUser ( integer $userId ) : array
$userId integer
Результат array

getBlogMenu() публичный метод

Gets the data necessary for the side menu on blog pages
public getBlogMenu ( ) : array
Результат array

getBlogPost() публичный метод

Get a specific blog post
public getBlogPost ( string $year, string $month, string $slug ) : array
$year string
$month string
$slug string
Результат array

getBlogPostById() публичный метод

Get a specific blog post by its row ID
public getBlogPostById ( integer $id ) : array
$id integer
Результат array

getBlogPostByUniqueId() публичный метод

Given a unique ID (shorturl), return the blog post.
public getBlogPostByUniqueId ( string $uniqueID ) : array
$uniqueID string
Результат array

getBlogPostUniqueId() публичный метод

Given a blog post ID, just get the unique ID (shorturl)
public getBlogPostUniqueId ( integer $postID ) : string
$postID integer
Результат string

getCategory() публичный метод

Return information about the current category
public getCategory ( string $slug ) : array
$slug string
Результат array

getCategoryTree() публичный метод

Get all subcategories for a given category (defaults to root)
public getCategoryTree ( integer $parent ) : array
$parent integer
Результат array

getCommentCache() публичный метод

Returns the cache container for blog comments:
public getCommentCache ( ) : CacheInterface
Результат CacheInterface

getCommentDepth() публичный метод

public getCommentDepth ( integer $commentId ) : integer
$commentId integer
Результат integer

getCommentTree() публичный метод

Get all of the blog comments for a given blog post
public getCommentTree ( integer $blogPostId ) : array
$blogPostId integer
Результат array

getCommentWithChildren() публичный метод

Get a comment (and all of its replies)
public getCommentWithChildren ( integer $commentId ) : array
$commentId integer
Результат array

getParentSeries() публичный метод

Get all of the parent series that a series belongs to.
public getParentSeries ( integer $seriesId, array $seenIds = [], integer $depth ) : array
$seriesId integer
$seenIds array
$depth integer
Результат array

getPostTags() публичный метод

Get all of the tags for a particular post
public getPostTags ( integer $postId ) : array
$postId integer
Результат array

getPostsSeries() публичный метод

Get all of the series' that this post belongs to:
public getPostsSeries ( integer $postId ) : array
$postId integer
Результат array

getSeriesById() публичный метод

Get information about a series
public getSeriesById ( integer $id ) : array
$id integer
Результат array

getSeriesExtra() защищенный метод

Get extra data
protected getSeriesExtra ( array $ser ) : array
$ser array
Результат array

getSeriesForPost() публичный метод

Get all the series that a given post belongs to.
public getSeriesForPost ( integer $postId ) : array
$postId integer
Результат array

getSeriesInfo() публичный метод

Get information about a series
public getSeriesInfo ( string $slug ) : array
$slug string
Результат array

getSeriesRecursive() защищенный метод

Recursively acquire parent series IDs into a flat array
protected getSeriesRecursive ( integer $seriesId, array $seen = [], integer $depth ) : array
$seriesId integer
$seen array
$depth integer
Результат array

getSnippet() публичный метод

Get a preview snippet of a blog post
public getSnippet ( array $post, boolean $after = false ) : array
$post array Post data
$after boolean Do we want the content after the fold?
Результат array

getTag() публичный метод

Return information about the current tag
public getTag ( string $slug ) : array
$slug string
Результат array

getTagCloud() публичный метод

Get $num of the most popular tags, paginated to start at $offset
public getTagCloud ( ) : array
Результат array

getTags() публичный метод

Get $num of the most popular tags, paginated to start at $offset
public getTags ( integer $num = 10, integer $offset ) : array
$num integer
$offset integer
Результат array

listAllPublic() публичный метод

Return all blog posts
public listAllPublic ( ) : array
Результат array

listBaseSeries() публичный метод

Get all of the base series
public listBaseSeries ( integer $num = 20, integer $offset ) : array
$num integer
$offset integer
Результат array

listByAuthor() публичный метод

Return an array of the most $num recent posts, including URL and title
public listByAuthor ( integer $authorId, integer $num = 20, integer $offset ) : array
$authorId integer
$num integer
$offset integer
Результат array

listByCategories() публичный метод

Return an array of the most $num recent posts, including URL and title
public listByCategories ( array $categories = [], integer $num = 20, integer $offset ) : array
$categories array
$num integer
$offset integer
Результат array

listByMonth() публичный метод

Return an array of the most $num recent posts, including URL and title
public listByMonth ( string $year, string $month, integer $num = 20, integer $offset ) : array
$year string
$month string
$num integer
$offset integer
Результат array

listBySeries() публичный метод

Return an array of the most $num recent posts, including URL and title
public listBySeries ( integer $seriesId, integer $num = 20, integer $offset ) : array
$seriesId integer
$num integer
$offset integer
Результат array

listByTag() публичный метод

Return an array of the most $num recent posts, including URL and title
public listByTag ( integer $tagId, integer $num = 20, integer $offset ) : array
$tagId integer
$num integer
$offset integer
Результат array

listByYear() публичный метод

Return an array of the most $num recent posts, including URL and title
public listByYear ( string $year, integer $num = 20, integer $offset ) : array
$year string
$num integer
$offset integer
Результат array

longURL() публичный метод

Get the long URL for a given short URL
public longURL ( string $shortURL = '' ) : string
$shortURL string
Результат string

postProcess() защищенный метод

Blog post database retrieval post-processing - D.R.Y.
protected postProcess ( array $post = [] ) : array
$post array
Результат array

recentFullPosts() публичный метод

Return an array of the most $num recent posts, including URL and title
public recentFullPosts ( integer $num = 20, integer $offset ) : array
$num integer
$offset integer
Результат array

Описание свойств

$defaultSeparator защищенное свойство

Break after this token.
protected $defaultSeparator