PHP Класс Camspiers\StatisticalClassifier\DataSource\DataArray

Автор: Cam Spiers ([email protected])
Наследование: implements Camspiers\StatisticalClassifier\DataSource\DataSourceInterface, implements Serializabl\Serializable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$config Holds the config class that setData needs to conforms to
$data array Should be in the form: array( array( 'category' => 'somecategory', 'document' => 'Some document' ) )
$processor Processes the data with the config

Открытые методы

Метод Описание
__construct ( array $data = null ) Creates the data array
addDocument ( $category, $document )
getCategories ( )
getConfig ( ) : mixed Return the config for the data
getData ( )
hasCategory ( $category )
serialize ( ) : string Serialize the class
setConfig ( DataSourceConfiguration $config )
setData ( array $data )
unserialize ( string $data ) : null Restore the serialized class
write ( )

Защищенные методы

Метод Описание
getProcessor ( ) : mixed Gets the processor
prepare ( ) Read the data and set it
read ( )
setProcessor ( Symfony\Component\Config\Definition\Processor $processor ) Sets the processor for the config

Описание методов

__construct() публичный Метод

Creates the data array
public __construct ( array $data = null )
$data array The initial data

addDocument() публичный Метод

public addDocument ( $category, $document )

getCategories() публичный Метод

public getCategories ( )

getConfig() публичный Метод

Return the config for the data
public getConfig ( ) : mixed
Результат mixed

getData() публичный Метод

public getData ( )

getProcessor() защищенный Метод

Gets the processor
protected getProcessor ( ) : mixed
Результат mixed

hasCategory() публичный Метод

public hasCategory ( $category )

prepare() защищенный Метод

Read the data and set it
protected prepare ( )

read() защищенный Метод

protected read ( )

serialize() публичный Метод

Serialize the class
public serialize ( ) : string
Результат string The serialized data

setConfig() публичный Метод

public setConfig ( DataSourceConfiguration $config )
$config Camspiers\StatisticalClassifier\Config\DataSourceConfiguration

setData() публичный Метод

public setData ( array $data )
$data array

setProcessor() защищенный Метод

Sets the processor for the config
protected setProcessor ( Symfony\Component\Config\Definition\Processor $processor )
$processor Symfony\Component\Config\Definition\Processor

unserialize() публичный Метод

Restore the serialized class
public unserialize ( string $data ) : null
$data string The serialized data
Результат null

write() публичный Метод

public write ( )

Описание свойств

$config защищенное свойство

Holds the config class that setData needs to conforms to
protected $config

$data защищенное свойство

Should be in the form: array( array( 'category' => 'somecategory', 'document' => 'Some document' ) )
protected array $data
Результат array

$processor защищенное свойство

Processes the data with the config
protected $processor