Habari\Vocabulary::exists PHP Method

exists() public static method

Determine whether a vocabulary exists
public static exists ( string $name ) : boolean
$name string a vocabulary name
return boolean whether the vocabulary exists or not
    public static function exists($name)
    {
        $query = Query::create('{vocabularies}')->select('count(id)');
        $query->where()->add('name = :name', array('name' => $name));
        return (int) $query->value() > 0;
    }