PHP Class GBExposedContent, gitblog

Inheritance: extends GBContent
Exibir arquivo Open project: rsms/gitblog Class Usage Examples

Public Properties

Property Type Description
$_rawBody # not serialized but only used during runtime
$body
$categories
$comments
$commentsOpen
$draft
$excerpt
$meta
$pingbackOpen
$slug
$tags
$title

Public Methods

Method Description
__construct ( $name = null, $id = null, $slug = null, $meta = [], $body = null )
__sleep ( )
__toString ( )
_findByMetaIndex ( $tags, $index, $op = 'and' )
_findByMetaIndexAND ( $tags, $index )
body ( )
buildHeaderFields ( )
categoryLinks ( $prefix = '', $suffix = '', $template = '<a href="%u">%n</a>', $nglue = ', ', $endglue = ' and ' )
collLinks ( $what, $prefix = '', $suffix = '', $template = '<a href="%u">%n</a>', $nglue = ', ', $endglue = ' and ', $htmlescape = true )
commentsLink ( $prefix = '', $suffix = '', $template = '<a href="%u" class="numcomments" title="%t">%n</a>' )
commentsStageName ( )
condensedVersion ( ) Return a, possibly cloned, version of this post which contains a minimal set of information. Primarily used for paged posts pages.
domID ( )
exists ( )
find ( $slug, $subdir = '', $class = 'GBExposedContent', $version = null, $applyBodyFilters = true )
findByCacheName ( $cachename )
findByCategories ( $cats, $pageno )
findByMetaIndex ( $tags, $indexname, $pageno )
findByTags ( $tags, $pageno )
findHeaderTerminatorOffset ( $data )
fnext ( )
getCommentsDB ( )
isDirty ( ) True if there are local, uncommitted modifications
isTracked ( )
isWorkVersion ( )
loadWork ( $path, $post = false, $class = 'GBExposedContent', $id = null, $slug = null, $applyBodyFilters = true )
numberOfComments ( $topological = true, $sone = 'comment', $smany = 'comments', $zero = 'No', $one = 'One' )
numberOfShadowedComments ( $sone = 'comment', $smany = 'comments', $zero = 'No', $one = 'One' )
numberOfUnapprovedComments ( $sone = 'comment', $smany = 'comments', $zero = 'No', $one = 'One' )
parseData ( $data )
parseHeader ( $lines, &$out )
parseHeaderFields ( )
parseVersion ( $version )
pathToCached ( $subdir, $slug ) * Get path to cached content where the slug is static.
pathToWork ( $subdir, $slug_fnpattern ) Find path to work content where the slug is static. Returns null if not found.
pathspecFromAbsPath ( $path )
rawBody ( $data = null )
recommendedFilenameExtension ( $default = '' )
recommendedName ( )
reload ( $data, $commits = null, $applyBodyFilters = true )
setRawBody ( $body )
tagLinks ( $prefix = '', $suffix = '', $template = '<a href="%u">%n</a>', $nglue = ', ', $endglue = ' and ' )
textBody ( )
toBlob ( )
url ( $include_version = false, $include_pathspec = false )
urlpath ( )

Method Details

__construct() public method

public __construct ( $name = null, $id = null, $slug = null, $meta = [], $body = null )

__sleep() public method

public __sleep ( )

__toString() public method

public __toString ( )

_findByMetaIndex() static public method

static public _findByMetaIndex ( $tags, $index, $op = 'and' )

_findByMetaIndexAND() static public method

static public _findByMetaIndexAND ( $tags, $index )

body() public method

public body ( )

buildHeaderFields() public method

public buildHeaderFields ( )

commentsStageName() public method

public commentsStageName ( )

condensedVersion() public method

Return a, possibly cloned, version of this post which contains a minimal set of information. Primarily used for paged posts pages.
public condensedVersion ( )

domID() public method

public domID ( )

exists() public method

public exists ( )

find() static public method

static public find ( $slug, $subdir = '', $class = 'GBExposedContent', $version = null, $applyBodyFilters = true )

findByCacheName() static public method

static public findByCacheName ( $cachename )

findByCategories() static public method

static public findByCategories ( $cats, $pageno )

findByMetaIndex() static public method

static public findByMetaIndex ( $tags, $indexname, $pageno )

findByTags() static public method

static public findByTags ( $tags, $pageno )

findHeaderTerminatorOffset() static public method

static public findHeaderTerminatorOffset ( $data )

fnext() public method

public fnext ( )

getCommentsDB() public method

public getCommentsDB ( )

isDirty() public method

True if there are local, uncommitted modifications
public isDirty ( )

isTracked() public method

public isTracked ( )

isWorkVersion() public method

public isWorkVersion ( )

loadWork() static public method

static public loadWork ( $path, $post = false, $class = 'GBExposedContent', $id = null, $slug = null, $applyBodyFilters = true )

numberOfComments() public method

public numberOfComments ( $topological = true, $sone = 'comment', $smany = 'comments', $zero = 'No', $one = 'One' )

numberOfShadowedComments() public method

public numberOfShadowedComments ( $sone = 'comment', $smany = 'comments', $zero = 'No', $one = 'One' )

numberOfUnapprovedComments() public method

public numberOfUnapprovedComments ( $sone = 'comment', $smany = 'comments', $zero = 'No', $one = 'One' )

parseData() public method

public parseData ( $data )

parseHeader() static public method

static public parseHeader ( $lines, &$out )

parseHeaderFields() public method

public parseHeaderFields ( )

parseVersion() static public method

static public parseVersion ( $version )

pathToCached() static public method

* Get path to cached content where the slug is static.
static public pathToCached ( $subdir, $slug )

pathToWork() static public method

Find path to work content where the slug is static. Returns null if not found.
static public pathToWork ( $subdir, $slug_fnpattern )

pathspecFromAbsPath() static public method

static public pathspecFromAbsPath ( $path )

rawBody() public method

public rawBody ( $data = null )

recommendedFilenameExtension() public method

public recommendedFilenameExtension ( $default = '' )

recommendedName() public method

public recommendedName ( )

reload() public method

public reload ( $data, $commits = null, $applyBodyFilters = true )

setRawBody() public method

public setRawBody ( $body )

textBody() public method

public textBody ( )

toBlob() public method

public toBlob ( )

url() public method

public url ( $include_version = false, $include_pathspec = false )

urlpath() public method

public urlpath ( )

Property Details

$_rawBody public_oe property

# not serialized but only used during runtime
public $_rawBody

$body public_oe property

public $body

$categories public_oe property

public $categories

$comments public_oe property

public $comments

$commentsOpen public_oe property

public $commentsOpen

$draft public_oe property

public $draft

$excerpt public_oe property

public $excerpt

$meta public_oe property

public $meta

$pingbackOpen public_oe property

public $pingbackOpen

$slug public_oe property

public $slug

$tags public_oe property

public $tags

$title public_oe property

public $title