HumHub Documentation (unofficial)

Term
in package

A Term represents a word from text. This is the unit of search. It is composed of two elements, the text of the word, as a string, and the name of the field that the text occured in, an interned string.

Note that terms may represent more than words from text fields, but also things like dates, email addresses, urls, etc.

Tags
category

Zend

subpackage

Index

Table of Contents

Properties

$field  : mixed
Field name or field number (depending from context)
$text  : string
Term value

Methods

__construct()  : mixed
Object constructor
getLength()  : string
Get UTF-8 string length
getPrefix()  : string
Get term prefix
key()  : string
Returns term key

Properties

$field

Field name or field number (depending from context)

public mixed $field

$text

Term value

public string $text

Methods

__construct()

Object constructor

public __construct(mixed $text[, mixed $field = null ]) : mixed
Parameters
$text : mixed
$field : mixed = null

getLength()

Get UTF-8 string length

public static getLength(string $str) : string
Parameters
$str : string
Return values
string

getPrefix()

Get term prefix

public static getPrefix(string $str, int $length) : string
Parameters
$str : string
$length : int
Return values
string

key()

Returns term key

public key() : string
Return values
string

        
On this page

Search results