\Anax\ContentCFileContent

A read content from filesystem.

Summary

Methods
Properties
Constants
configure()
setDI()
get()
setBasePath()
setSuffix()
No public properties found
No constants found
No protected methods found
$di
N/A
No private methods found
$config
$path
N/A

Properties

$di

$di : 

Properties

Type

$config

$config : 

Properties

Type

$path

$path : 

Base path to content.

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

get()

get(string  $file) : string

Get file as content.

Parameters

string $file

with content

Throws

\Anax\Content\Exception

when file does not exist

Returns

string —

as content of the file

setBasePath()

setBasePath(string  $path) : $this

Set base path where to find content.

Parameters

string $path

where content reside

Returns

$this

setSuffix()

setSuffix(string  $suffix) : $this

Set standard suffix.

Parameters

string $suffix

to use as standard suffix of filename

Returns

$this