PHP Interface Camspiers\StatisticalClassifier\DataSource\DataSourceInterface

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

Public Methods

Method 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 method

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 method

Returns the categories of the data
public getCategories ( ) : array
return array The categories

getData() public method

Get the data
public getData ( ) : array
return array The data

hasCategory() public method

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

setData() public method

Set data to the data source
public setData ( array $data ) : null
$data array
return null

write() public method

Write the data source if possible
public write ( ) : null
return null