PHP Интерфейс Camspiers\StatisticalClassifier\DataSource\DataSourceInterface

Автор: Cam Spiers ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
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

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

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

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() публичный Метод

Returns the categories of the data
public getCategories ( ) : array
Результат array The categories

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

Get the data
public getData ( ) : array
Результат array The data

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

Returnnes whether or not the data has a category
public hasCategory ( string $category ) : boolean
$category string The category to check
Результат boolean [description]

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

Set data to the data source
public setData ( array $data ) : null
$data array
Результат null

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

Write the data source if possible
public write ( ) : null
Результат null