\Anax\ContentCFileBasedContent

Pages based on file content.

Summary

Methods
Properties
Constants
configure()
setDI()
useCache()
getIndex()
contentForRoute()
No public properties found
No constants found
No protected methods found
$di
N/A
loadIndex()
createIndex()
mapRoute2Index()
$config
$index
$ignoreCache
N/A

Properties

$di

$di : 

Properties

Type

$config

$config : 

Properties

Type

$index

$index : 

Properties.

Type

$ignoreCache

$ignoreCache : 

Type

Methods

configure()

configure(\Anax\array/string  $what) : $this

Read configuration from file or array'.

Parameters

\Anax\array/string $what

is an array with key/value config options or a file to be included which returns such an array.

Returns

$this —

for chaining.

setDI()

setDI(\Anax\DI\class  $di) : $this

Set the service container to use

Parameters

\Anax\DI\class $di

a service container

Returns

$this

useCache()

useCache(boolean  $use) : \Anax\Content\this.

Should the cache be used or ignored.

Parameters

boolean $use

true to use the cache or false to ignore the cache.

Returns

\Anax\Content\this.

getIndex()

getIndex() : array

Get the index as an array.

Returns

array —

as index.

contentForRoute()

contentForRoute() 

Map url to content if such mapping can be done.

Throws

\Anax\Content\NotFoundException

when mapping can not be done.

loadIndex()

loadIndex() : array

Create the index of all content into an array.

Returns

array —

as index.

createIndex()

createIndex() : array

Generate an index from the directory structure.

Returns

array —

as table of content.

mapRoute2Index()

mapRoute2Index(string  $route) : string

Map the route to the correct entry in the index.

Parameters

string $route

current route used to access page.

Returns

string —

as the title for the content.