Properties

$options

$options : array

Stores the configuration options

Type

array

$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

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

setDefaultOptions()

setDefaultOptions(\Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver)

Sets the configuration for the options resolver

Parameters

\Symfony\Component\OptionsResolver\OptionsResolverInterface $resolver

read()

read()

readColumns()

readColumns(mixed $handle) : array

Parameters

mixed $handle

Throws

\RuntimeException

Returns

array

checkColumns()

checkColumns(mixed $columns) : array

Parameters

mixed $columns

Throws

\RuntimeException

Returns

array

readLine()

readLine(mixed $handle) : array

Parameters

mixed $handle

Returns

array

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