Properties

$data

$data : array

An array to hold the sources data

Should be in the form: array( array( 'category' => 'somecategory', 'document' => 'Some document' ) )

Type

array

$config

$config

Holds the config class that setData needs to conforms to

$processor

$processor

Processes the data with the config

$filename

$filename : string

The filename to read and write to

Type

string

Methods

__construct()

__construct(array $data)

Creates the data array

Parameters

array $data

The initial data

write()

write()

getCategories()

getCategories()

hasCategory()

hasCategory( $category)

Parameters

$category

addDocument()

addDocument( $category,  $document)

Parameters

$category
$document

getData()

getData()

setData()

setData(array $data)

Parameters

array $data

serialize()

serialize() : string

Serialize the class

Returns

string —

The serialized data

unserialize()

unserialize(string $data) : null

Restore the serialized class

Parameters

string $data

The serialized data

Returns

null

getConfig()

getConfig() : mixed

Return the config for the data

Returns

mixed

read()

read()

setProcessor()

setProcessor(\Symfony\Component\Config\Definition\Processor $processor)

Sets the processor for the config

Parameters

\Symfony\Component\Config\Definition\Processor $processor

getProcessor()

getProcessor() : mixed

Gets the processor

Returns

mixed

prepare()

prepare()

Read the data and set it