PHP Class Airship\Cabin\Hull\Blueprint\Blog

Read-only access to blog posts, etc. Create comments.
Inheritance: extends BlueprintGear
Afficher le fichier Open project: paragonie/airship Class Usage Examples

Protected Properties

Свойство Type Description
$defaultSeparator Break after this token.

Méthodes publiques

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

Méthodes protégées

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

Method Details

addCommentToPost() public méthode

Adds a new comment to a blog post
public addCommentToPost ( array $post, integer $blogPostId, boolean $published = false ) : boolean
$post array
$blogPostId integer
$published boolean
Résultat boolean

checkCommentReplyTo() public méthode

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
Résultat mixed

countByAuthor() public méthode

Return an array of the most $num recent posts, including URL and title
public countByAuthor ( integer $authorId ) : integer
$authorId integer
Résultat integer

countByCategories() public méthode

Return an array of the most $num recent posts, including URL and title
public countByCategories ( array $categories = [] ) : integer
$categories array
Résultat integer

countByMonth() public méthode

Return an array of the most $num recent posts, including URL and title
public countByMonth ( string $year, string $month ) : integer
$year string
$month string
Résultat integer

countBySeries() public méthode

How many items are in this series?
public countBySeries ( integer $seriesId ) : integer
$seriesId integer
Résultat integer

countByTag() public méthode

Return an array of the most $num recent posts, including URL and title
public countByTag ( integer $tag ) : integer
$tag integer
Résultat integer

countByYear() public méthode

Return an array of the most $num recent posts, including URL and title
public countByYear ( string $year ) : integer
$year string
Résultat integer

countSeries() public méthode

How many items are in this series?
public countSeries ( ) : integer
Résultat integer

expandCategory() public méthode

Expand a category to include all subcategories
public expandCategory ( integer $category_id, integer $depth ) : array
$category_id integer
$depth integer
Résultat array

getAuthor() public méthode

Return information about the current category
public getAuthor ( integer $authorId ) : array
$authorId integer
Résultat array

getAuthorBySlug() public méthode

Return information about the current category
public getAuthorBySlug ( string $authorSlug ) : array
$authorSlug string
Résultat array

getAuthorsForUser() public méthode

Get all of the authors available for this user to post under
public getAuthorsForUser ( integer $userId ) : array
$userId integer
Résultat array

getBlogMenu() public méthode

Gets the data necessary for the side menu on blog pages
public getBlogMenu ( ) : array
Résultat array

getBlogPost() public méthode

Get a specific blog post
public getBlogPost ( string $year, string $month, string $slug ) : array
$year string
$month string
$slug string
Résultat array

getBlogPostById() public méthode

Get a specific blog post by its row ID
public getBlogPostById ( integer $id ) : array
$id integer
Résultat array

getBlogPostByUniqueId() public méthode

Given a unique ID (shorturl), return the blog post.
public getBlogPostByUniqueId ( string $uniqueID ) : array
$uniqueID string
Résultat array

getBlogPostUniqueId() public méthode

Given a blog post ID, just get the unique ID (shorturl)
public getBlogPostUniqueId ( integer $postID ) : string
$postID integer
Résultat string

getCategory() public méthode

Return information about the current category
public getCategory ( string $slug ) : array
$slug string
Résultat array

getCategoryTree() public méthode

Get all subcategories for a given category (defaults to root)
public getCategoryTree ( integer $parent ) : array
$parent integer
Résultat array

getCommentCache() public méthode

Returns the cache container for blog comments:
public getCommentCache ( ) : CacheInterface
Résultat CacheInterface

getCommentDepth() public méthode

public getCommentDepth ( integer $commentId ) : integer
$commentId integer
Résultat integer

getCommentTree() public méthode

Get all of the blog comments for a given blog post
public getCommentTree ( integer $blogPostId ) : array
$blogPostId integer
Résultat array

getCommentWithChildren() public méthode

Get a comment (and all of its replies)
public getCommentWithChildren ( integer $commentId ) : array
$commentId integer
Résultat array

getParentSeries() public méthode

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

getPostTags() public méthode

Get all of the tags for a particular post
public getPostTags ( integer $postId ) : array
$postId integer
Résultat array

getPostsSeries() public méthode

Get all of the series' that this post belongs to:
public getPostsSeries ( integer $postId ) : array
$postId integer
Résultat array

getSeriesById() public méthode

Get information about a series
public getSeriesById ( integer $id ) : array
$id integer
Résultat array

getSeriesExtra() protected méthode

Get extra data
protected getSeriesExtra ( array $ser ) : array
$ser array
Résultat array

getSeriesForPost() public méthode

Get all the series that a given post belongs to.
public getSeriesForPost ( integer $postId ) : array
$postId integer
Résultat array

getSeriesInfo() public méthode

Get information about a series
public getSeriesInfo ( string $slug ) : array
$slug string
Résultat array

getSeriesRecursive() protected méthode

Recursively acquire parent series IDs into a flat array
protected getSeriesRecursive ( integer $seriesId, array $seen = [], integer $depth ) : array
$seriesId integer
$seen array
$depth integer
Résultat array

getSnippet() public méthode

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

getTag() public méthode

Return information about the current tag
public getTag ( string $slug ) : array
$slug string
Résultat array

getTagCloud() public méthode

Get $num of the most popular tags, paginated to start at $offset
public getTagCloud ( ) : array
Résultat array

getTags() public méthode

Get $num of the most popular tags, paginated to start at $offset
public getTags ( integer $num = 10, integer $offset ) : array
$num integer
$offset integer
Résultat array

listAllPublic() public méthode

Return all blog posts
public listAllPublic ( ) : array
Résultat array

listBaseSeries() public méthode

Get all of the base series
public listBaseSeries ( integer $num = 20, integer $offset ) : array
$num integer
$offset integer
Résultat array

listByAuthor() public méthode

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

listByCategories() public méthode

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

listByMonth() public méthode

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

listBySeries() public méthode

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

listByTag() public méthode

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

listByYear() public méthode

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

longURL() public méthode

Get the long URL for a given short URL
public longURL ( string $shortURL = '' ) : string
$shortURL string
Résultat string

postProcess() protected méthode

Blog post database retrieval post-processing - D.R.Y.
protected postProcess ( array $post = [] ) : array
$post array
Résultat array

recentFullPosts() public méthode

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

Property Details

$defaultSeparator protected_oe property

Break after this token.
protected $defaultSeparator