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

$pdo

$pdo : \PDO

The pdo connection object

Type

\PDO

$category

$category : string

The category of the query

Type

string

$query

$query : string

The query to run

Type

string

$documentColumn

$documentColumn : string

The column to use for the document

Type

string

Methods

__construct()

__construct(array $data)

Creates the data array

Parameters

array $data

The initial data

getCategories()

getCategories()

hasCategory()

hasCategory( $category)

Parameters

$category

addDocument()

addDocument( $category,  $document)

Parameters

$category
$document

getData()

getData()

setData()

setData(array $data)

Parameters

array $data

write()

write()

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