Returns fuzzy terms.

@param mixed $mode 1, 2, 'AUTO'
331186
public static function getFuzzyTerms(string $term, $mode): array
    {
        $distance = self::getFuzzyDistance($term, $mode);
        if (1 === $distance) {
            return self::generateFuzzyTerms($term);
        }

        return self::generateFuzzyTermsTwice($term);
    }
252125
public function getTermsByType($type)
    {
        $terms = new ArrayCollection();
        $taxonomies = $this->getTaxonomiesByType($type);

        /* @var TermTaxonomy $taxonomy */
        if ($taxonomies !== null) {
            foreach ($taxonomies as $taxonomy) {
                $terms[] = $taxonomy->getTerm();
            }
        }

        return ($terms->count() == 0) ? null : $terms;
    }
215807
public function getTerms($taxonomy)
    {
        // If terms isn't set
        if (!$this->terms) {
            // Retrieve the transient value
            $transientKey = sprintf('WPMVC\Models\Post::getTerms(%s)', $this->id(), $taxonomy);
            $terms = WP::getTransient($transientKey);
            // If the terms isn't found in the cache
            if (!$terms) {
                // Query for the terms
                $args = array(
                    'orderby' => 'name',
                    'order' => 'ASC'
                );
                // Retrieve and set the terms
                $terms = wp_get_post_terms($this->id(), $taxonomy, $args);
                // Store into the cache
                WP::setTransient($transientKey, $terms, static::$transientTimeout);
            }
            // Set the terms
            $this->terms[$taxonomy] = $terms;
        }
        return $this->terms[$taxonomy];
    }
1336387
public function fetchAll($mode = \PDO::FETCH_CLASS)
    {
        $rows = [];
        try {
            $rows = $this->sth->fetchAll($mode);
        } catch (\PDOException $e) {
            $this->errorInfo('', $e->getMessage());
            throw $e;
        }
        return $rows;
    }
1034283
public function setMode($mode)
    {
        $this->mode = (null === $mode ? null : (bool) $mode);
        return $this;
    }
438378
public function getTerms($taxonomy = '')
    {
        if ($taxonomy) {
            $term_ids = $this->taxonomies->where('taxonomy', $taxonomy)->pluck('term_id');
        } else {
            $term_ids = $this->getTaxonomies('term_id');
        }

        return Term::whereIn('id', $term_ids)->get();
    }
65908
public function getLastHeight($mode = false)
    {
        for ($k=count($this->table)-1; $k>=0; $k--) {
            if ($this->table[$k]['height']) {
                $h = $this->table[$k]['height'];
                if ($mode) {
                    $h+= $this->table[$k]['border']['t']['width'] + $this->table[$k]['padding']['t'] + 0.02;
                    $h+= $this->table[$k]['border']['b']['width'] + $this->table[$k]['padding']['b'] + 0.02;
                }
                return $h;
            }
        }
        return $this->pdf->getH() - $this->pdf->gettMargin() - $this->pdf->getbMargin();
    }
991062
public static function setMode($mode = '')
    {
        static::$MODE = 0;
        if (empty($mode)) {
            return;
        }
        $mode = explode(',', $mode);
        foreach ($mode as $m) {
            static::$MODE |= constant('static::SQL_MODE_' . $m);
        }
    }
758840
public static function view_glossary($id, $mode) {
        $params = self::validate_parameters(self::view_glossary_parameters(), array(
            'id' => $id,
            'mode' => $mode
        ));
        $id = $params['id'];
        $mode = $params['mode'];
        $warnings = array();

        // Get and validate the glossary.
        list($glossary, $context, $course, $cm) = self::validate_glossary($id);

        // Trigger module viewed event.
        glossary_view($glossary, $course, $cm, $context, $mode);

        return array(
            'status' => true,
            'warnings' => $warnings
        );
    }
292394
public function setIterationMode($mode) {
		switch ($mode) {
			case self::ITERATION_STRAIGHT:
				$this->_map = array_keys($this->_data);
				break;
			
			case self::ITERATION_REVERSE:
				$this->_map = array_reverse(array_keys($this->_data));
				break;
			
			case self::ITERATION_EVEN:
				$this->_map = [];
				
				foreach (array_keys($this->_data) as $key => $value) {
					if ($key % 2 === 0) {
						$this->_map[] = $value;
					}
				}
				break;
				
			case self::ITERATION_ODD:
				$this->_map = [];
				
				foreach (array_keys($this->_data) as $key => $value) {
					if ($key % 2 !== 0) {
						$this->_map[] = $value;
					}
				}
				break;
		}
		
		return $this;
	}
424775
public function getTerms($taxonomy) {
		static $table = 'terms';
		$this->_init();
		$taxonomy = $this->_db->real_escape_string($taxonomy);
		$termIds = $this->_query('SELECT term_taxonomy_id FROM '.$this->getTable('term_taxonomy').' WHERE taxonomy = \''.$taxonomy.'\'', 'term_taxonomy_id', true);
		$result = $this->_query('SELECT * FROM '.$this->getTable($table).' WHERE term_id IN ('.implode(',', $termIds).')', 'term_id');
		foreach ($result as &$item) {
			$item[self::HINT]['table'] = $table;
			unset($item);
		}
		return $result;
	}
242495
public static function sortTerms($terms)
    {
        $sort_terms = array();
        foreach ($terms as $term) {
            $sort_terms[$term->name] = $term;
        }
        uksort($sort_terms, 'strnatcmp');

        return $sort_terms;
    }
980974
def expression(mode=nil)
      if @expression && (mode.nil? || mode == self.mode)
        @expression
      else
        Expression.compose(terms, mode || self.mode)
      end
    end
716480
public function mode($mode = null)
    {
        if (func_num_args() === 0) {
            return $this->_mode;
        }
        $this->_mode = $mode;
        return $this;
    }
299343
protected function calculateMode(string $mode, bool $extended): int
    {
        if (true === $extended) {
            return self::ALL;
        }

        if (self::READ === $mode) {
            return self::READONLY;
        }

        return self::WRITEONLY;
    }
530701
public function terms()
    {
        $termsList = array();

        foreach ($this->_indices as $index) {
            $termsList[] = $index->terms();
        }

        return array_unique(call_user_func_array('array_merge', $termsList));
    }
1107053
def terms(self):
        """"""
        terms = PropertyTerms(
            self.name,
            self.__class__,
            self._args,
            self._kwargs,
            self.meta
        )
        return terms