Skip to content

Commit

Permalink
getters and setters
Browse files Browse the repository at this point in the history
  • Loading branch information
nticaric committed Jul 14, 2023
1 parent 9a02543 commit 56542f9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Engines/EngineTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,9 @@ public function setLanguage($language = 'no')
$class = 'TeamTNT\\TNTSearch\\Stemmer\\' . ucfirst(strtolower($language)) . 'Stemmer';
$this->setStemmer(new $class);
}

public function setDatabaseHandle($dbh)
{
$this->dbh = $dbh;
}
}
59 changes: 59 additions & 0 deletions src/TNTSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,63 @@ public function fuzzyNoLimit($value)
{
$this->engine->fuzzy_no_limit = $value;
}

public function setFuzziness($value)
{
$this->engine->fuzziness = $value;
}

public function setFuzzyDistance($value)
{
$this->engine->fuzzy_distance = $value;
}

public function setFuzzyPrefixLength($value)
{
$this->engine->fuzzy_prefix_length = $value;
}

public function setFuzzyMaxExpansions($value)
{
$this->engine->fuzzy_max_expansions = $value;
}

public function setFuzzyNoLimit($value)
{
$this->engine->fuzzy_no_limit = $value;
}
public function setAsYouType($value)
{
$this->engine->asYouType = $value;
}

public function getFuzziness()
{
return $this->engine->fuzziness;
}

public function getFuzzyDistance()
{
return $this->engine->fuzzy_distance;
}

public function getFuzzyPrefixLength()
{
return $this->engine->fuzzy_prefix_length;
}

public function getFuzzyMaxExpansions()
{
return $this->engine->fuzzy_max_expansions;
}
public function getFuzzyNoLimit()
{
return $this->engine->fuzzy_no_limit;
}

public function getAsYouType()
{
return $this->engine->asYouType;
}

}

0 comments on commit 56542f9

Please sign in to comment.