PHP Class Camspiers\StatisticalClassifier\DataSource\DataArray

Author: Cam Spiers ([email protected])
Inheritance: implements Camspiers\StatisticalClassifier\DataSource\DataSourceInterface, implements Serializabl\Serializable
Afficher le fichier Open project: camspiers/statistical-classifier Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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 ( )

Méthodes protégées

Méthode Description
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

Method Details

__construct() public méthode

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

addDocument() public méthode

public addDocument ( $category, $document )

getCategories() public méthode

public getCategories ( )

getConfig() public méthode

Return the config for the data
public getConfig ( ) : mixed
Résultat mixed

getData() public méthode

public getData ( )

getProcessor() protected méthode

Gets the processor
protected getProcessor ( ) : mixed
Résultat mixed

hasCategory() public méthode

public hasCategory ( $category )

prepare() protected méthode

Read the data and set it
protected prepare ( )

read() protected méthode

protected read ( )

serialize() public méthode

Serialize the class
public serialize ( ) : string
Résultat string The serialized data

setConfig() public méthode

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

setData() public méthode

public setData ( array $data )
$data array

setProcessor() protected méthode

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

unserialize() public méthode

Restore the serialized class
public unserialize ( string $data ) : null
$data string The serialized data
Résultat null

write() public méthode

public write ( )

Property Details

$config protected_oe property

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

$data protected_oe property

Should be in the form: array( array( 'category' => 'somecategory', 'document' => 'Some document' ) )
protected array $data
Résultat array

$processor protected_oe property

Processes the data with the config
protected $processor