Neuron-PHP

Markdown extends Base
in package
implements IView uses CacheableView

Generate html output by combining a layout with a view and data.

Table of Contents

Interfaces

IView
View interface for the Neuron MVC framework's rendering system.

Properties

$fs  : IFileSystem
$_cache  : ViewCache|null
$_cacheEnabled  : bool|null
$_controller  : string
$_layout  : string
$_page  : string

Methods

__construct()  : mixed
getCacheEnabled()  : bool|null
Get cache enabled setting for this view instance
getController()  : string
getLayout()  : string
getPage()  : string
render()  : string
Render data array into formatted output string.
setCacheEnabled()  : Base
Set cache enabled setting for this view instance
setController()  : Html
setLayout()  : Html
setPage()  : Html
findMarkdownFile()  : string|null
Find markdown file using directory path
getCachedContent()  : string|null
Get cached content
getCacheKey()  : string
Get cache key for current view
getCommonmarkConverter()  : MarkdownConverter
isCacheEnabled()  : bool
Check if cache is enabled
setCachedContent()  : void
Set cached content
getCache()  : ViewCache|null
Get cache instance
initializeCache()  : ViewCache|null
Initialize cache from registry

Properties

$_cacheEnabled

private bool|null $_cacheEnabled = null

$_controller

private string $_controller

$_layout

private string $_layout

$_page

private string $_page

Methods

getCacheEnabled()

Get cache enabled setting for this view instance

public getCacheEnabled() : bool|null
Return values
bool|null

null means use global config, true/false overrides global

getController()

public getController() : string
Return values
string

getLayout()

public getLayout() : string
Return values
string

getPage()

public getPage() : string
Return values
string

render()

Render data array into formatted output string.

public render(array<string|int, mixed> $data) : string
Parameters
$data : array<string|int, mixed>
Tags
throws
NotFound
throws
CommonMarkException

Outputs the html data from the layout and view.

Return values
string

markdown output

setCacheEnabled()

Set cache enabled setting for this view instance

public setCacheEnabled(bool|null $cacheEnabled) : Base
Parameters
$cacheEnabled : bool|null

null uses global config, true/false overrides

Return values
Base

setController()

public setController(string $controller) : Html
Parameters
$controller : string
Return values
Html

setLayout()

public setLayout(string $layout) : Html
Parameters
$layout : string
Return values
Html

setPage()

public setPage(string $page) : Html
Parameters
$page : string
Return values
Html

findMarkdownFile()

Find markdown file using directory path

protected findMarkdownFile(string $basePath, string $pageName) : string|null
Parameters
$basePath : string

Base directory for controller views

$pageName : string

Relative path to markdown file (e.g., "cms/guides/authentication")

Return values
string|null

Full path to markdown file or null if not found

getCachedContent()

Get cached content

protected getCachedContent(string $key) : string|null
Parameters
$key : string
Return values
string|null

getCacheKey()

Get cache key for current view

protected getCacheKey(array<string|int, mixed> $data) : string
Parameters
$data : array<string|int, mixed>
Return values
string

getCommonmarkConverter()

protected getCommonmarkConverter() : MarkdownConverter
Return values
MarkdownConverter

isCacheEnabled()

Check if cache is enabled

protected isCacheEnabled() : bool
Return values
bool

setCachedContent()

Set cached content

protected setCachedContent(string $key, string $content) : void
Parameters
$key : string
$content : string

        
On this page

Search results