PHP 클래스 Airship\Cabin\Hull\Blueprint\Blog

Read-only access to blog posts, etc. Create comments.
상속: extends BlueprintGear
파일 보기 프로젝트 열기: paragonie/airship 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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