PHP Class Airship\Cabin\Hull\Blueprint\CustomPages

Custom web pages
Inheritance: extends BlueprintGear
Show file Open project: paragonie/airship Class Usage Examples

Protected Properties

Property Type Description
$cabin string

Public Methods

Method Description
getDirectoryId ( string $dir, integer $parent, string $cabin = '' ) : integer Get the directory ID for a given path
getLatestVersion ( integer $pageId ) : array Get the latest version of a custom page
getPage ( string $file, integer $directoryId, string $cabin = '' ) : array Get information about a custom page.
getPageById ( integer $pageId ) : array Get information about a custom page.
getParentDir ( array $dirs = [], string $cabin = '' ) : integer Get the parent directory
getParentDirFromStr ( string $dir, string $cabin = '' ) : integer Get the parent directory
getPathFromDirectoryId ( integer $directoryId, string $cabin = '', array $idsEncountered = [] ) : array Get all of the parent directories' URL components
serveRedirect ( string $uri ) : boolean If a redirect exists at this path, serve it.
setCabin ( string $cabin ) : self Set the cabin for this gear

Method Details

getDirectoryId() public method

Get the directory ID for a given path
public getDirectoryId ( string $dir, integer $parent, string $cabin = '' ) : integer
$dir string
$parent integer
$cabin string
return integer

getLatestVersion() public method

Get the latest version of a custom page
public getLatestVersion ( integer $pageId ) : array
$pageId integer
return array

getPage() public method

Get information about a custom page.
public getPage ( string $file, integer $directoryId, string $cabin = '' ) : array
$file string
$directoryId integer
$cabin string
return array

getPageById() public method

Get information about a custom page.
public getPageById ( integer $pageId ) : array
$pageId integer
return array

getParentDir() public method

Get the parent directory
public getParentDir ( array $dirs = [], string $cabin = '' ) : integer
$dirs array
$cabin string
return integer

getParentDirFromStr() public method

Get the parent directory
public getParentDirFromStr ( string $dir, string $cabin = '' ) : integer
$dir string
$cabin string
return integer

getPathFromDirectoryId() public method

Get all of the parent directories' URL components
public getPathFromDirectoryId ( integer $directoryId, string $cabin = '', array $idsEncountered = [] ) : array
$directoryId integer
$cabin string
$idsEncountered array Prevent infinite loops
return array

serveRedirect() public method

If a redirect exists at this path, serve it.
public serveRedirect ( string $uri ) : boolean
$uri string
return boolean

setCabin() public method

Set the cabin for this gear
public setCabin ( string $cabin ) : self
$cabin string
return self

Property Details

$cabin protected property

protected string $cabin
return string