PHP Interface Camspiers\StatisticalClassifier\DataSource\DataSourceInterface

Author: Cam Spiers ([email protected])
Afficher le fichier Open project: camspiers/statistical-classifier Interface Usage Examples

Méthodes publiques

Méthode Description
addDocument ( string $category, string $document ) Adds a document by category to the data
getCategories ( ) : array Returns the categories of the data
getData ( ) : array Get the data
hasCategory ( string $category ) : boolean Returnnes whether or not the data has a category
setData ( array $data ) : null Set data to the data source
write ( ) : null Write the data source if possible

Method Details

addDocument() public méthode

Adds a document by category to the data
public addDocument ( string $category, string $document )
$category string The category of the document
$document string The document

getCategories() public méthode

Returns the categories of the data
public getCategories ( ) : array
Résultat array The categories

getData() public méthode

Get the data
public getData ( ) : array
Résultat array The data

hasCategory() public méthode

Returnnes whether or not the data has a category
public hasCategory ( string $category ) : boolean
$category string The category to check
Résultat boolean [description]

setData() public méthode

Set data to the data source
public setData ( array $data ) : null
$data array
Résultat null

write() public méthode

Write the data source if possible
public write ( ) : null
Résultat null