PHP Class Airship\Cabin\Hull\Landing\BlogPosts

Read-only access to blog posts.
Inheritance: extends LandingGear
Show file Open project: paragonie/airship

Protected Properties

Property Type Description
$blog Airship\Cabin\Hull\Blueprint\Blog

Public Methods

Method Description
airshipLand ( ) This function is called after the dependencies have been injected by AutoPilot. Think of it as a user-land constructor.
index ( ) Blog post home
listAll ( ) List all of the blog posts
listByAuthor ( string $slug, string $page = '' ) List all of the blog posts for a given year
listByCategory ( string $slug = '', string $page = '' ) List all of the blog posts for a given year
listBySeries ( string $slug = '', string $page = '' ) List all of the blog posts for a given year
listByTag ( string $slug, string $page = '' ) List all of the blog posts for a given tag
listMonth ( string $year, string $month ) List all of the blog posts for a given year/month
listSeries ( ) List all of the blog posts for a given year
listYear ( string $year ) List all of the blog posts for a given year
readPost ( string $year, string $month, string $slug ) Read a blog post
shortURL ( string $uniqueID = '' ) Handle short URLs

Protected Methods

Method Description
addComment ( array $post = [], integer $blogPostId ) : boolean Add a comment to a blog post
getOffsetAndLimit ( mixed $page = null ) : array Gets [offset, limit] based on Blog configuration

Method Details

addComment() protected method

Add a comment to a blog post
protected addComment ( array $post = [], integer $blogPostId ) : boolean
$post array
$blogPostId integer
return boolean

airshipLand() public method

This function is called after the dependencies have been injected by AutoPilot. Think of it as a user-land constructor.
public airshipLand ( )

getOffsetAndLimit() protected method

Gets [offset, limit] based on Blog configuration
protected getOffsetAndLimit ( mixed $page = null ) : array
$page mixed
return array

index() public method

Blog post home
public index ( )

listAll() public method

List all of the blog posts
public listAll ( )

listByAuthor() public method

List all of the blog posts for a given year
public listByAuthor ( string $slug, string $page = '' )
$slug string
$page string

listByCategory() public method

List all of the blog posts for a given year
public listByCategory ( string $slug = '', string $page = '' )
$slug string
$page string

listBySeries() public method

List all of the blog posts for a given year
public listBySeries ( string $slug = '', string $page = '' )
$slug string
$page string

listByTag() public method

List all of the blog posts for a given tag
public listByTag ( string $slug, string $page = '' )
$slug string
$page string

listMonth() public method

List all of the blog posts for a given year/month
public listMonth ( string $year, string $month )
$year string
$month string

listSeries() public method

List all of the blog posts for a given year
public listSeries ( )

listYear() public method

List all of the blog posts for a given year
public listYear ( string $year )
$year string

readPost() public method

Read a blog post
public readPost ( string $year, string $month, string $slug )
$year string
$month string
$slug string

shortURL() public method

Handle short URLs
public shortURL ( string $uniqueID = '' )
$uniqueID string

Property Details

$blog protected property

protected Blog,Airship\Cabin\Hull\Blueprint $blog
return Airship\Cabin\Hull\Blueprint\Blog