Returnnes whether or not the data has a category
public hasCategory ( string $category ) : boolean | ||
$category | string | The category to check |
return | boolean | [description] |
/** * @inheritdoc */ public function is($category, $document) { if ($this->dataSource->hasCategory($category)) { return $this->classify($document) === $category; } else { throw new RuntimeException(sprintf("The category '%s' doesn't exist", $category)); } }