| Next revision | Previous revision |
| scriptlog:lib:core:searchfinder [2026/09/26 09:09] – admin admin | scriptlog:lib:core:searchfinder [2026/09/26 09:34] (current) – admin admin |
|---|
| ======= Docblock Metadata ======= | ======= Docblock Metadata ======= |
| |
| ^ Tag ^ Value ^ | ^ Tag ^ Value ^ |
| | ''@category'' | Core Class | | | ''@category'' | Core Class | |
| | ''@author'' | Maoelana Noermoehammad | | | ''@author'' | Maoelana Noermoehammad | |
| | ''@license'' | MIT | | | ''@license'' | MIT | |
| | ''@version'' | 1.0 | | | ''@version'' | 1.0 | |
| | ''@since'' | Since Release 1.0 | | | ''@since'' | Since Release 1.0 | |
| |
| ======= Inheritance ======= | ======= Inheritance ======= |
| //None.// | //None.// |
| |
| ======= Properties (0) ======= | ======= Properties (2) ======= |
| |
| //None declared.// | ^ Visibility ^ Type ^ Name ^ Default ^ Line ^ |
| | | ''private'' | ''(untyped)'' | ''$dbc'' | | 26 | |
| | | ''protected'' | ''(untyped)'' | ''$error'' | | 33 | |
| |
| ======= Methods (8) ======= | ======= Methods (8) ======= |
| |
| ^ Visibility ^ Method ^ Summary ^ Line ^ | ^ Visibility ^ Method ^ Summary ^ Line ^ |
| | public | ''__construct()'' | Initialize object properties and method | 39 | | | public | ''__construct()'' | Initialize object properties and method | 39 | |
| | public | ''__destruct()'' | (undocumented) | 46 | | | public | ''__destruct()'' | (undocumented) | 46 | |
| | public | ''getError()'' | Get error message | 56 | | | public | ''getError()'' | Get error message | 56 | |
| | public | ''sanitizeKeyword()'' | Sanitize search keyword | 68 | | | public | ''sanitizeKeyword()'' | Sanitize search keyword | 68 | |
| | private | ''buildBooleanQuery()'' | Build a FULLTEXT boolean mode query string from user keyword. | 101 | | | private | ''buildBooleanQuery()'' | Build a FULLTEXT boolean mode query string from user keyword. | 101 | |
| | public | ''searchPost()'' | Search posts | 121 | | | public | ''searchPost()'' | Search posts | 121 | |
| | public | ''searchPage()'' | Search pages | 182 | | | public | ''searchPage()'' | Search pages | 182 | |
| | public | ''searchAll()'' | Search both posts and pages | 243 | | | public | ''searchAll()'' | Search both posts and pages | 243 | |
| |
| |
| Strips FULLTEXT boolean mode operators to prevent operator injection. | Strips FULLTEXT boolean mode operators to prevent operator injection. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$keyword'' | ''(untyped)'' | //required// | //none// | | | ''$keyword'' | ''(untyped)'' | //required// | //none// | |
| |
| **Returns:** ''(none declared)'' — string | **Returns:** ''(none declared)'' — string |
| Prepends + to each word for AND semantics. | Prepends + to each word for AND semantics. |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$keyword'' | ''(untyped)'' | //required// | Already-sanitized keyword | | | ''$keyword'' | ''(untyped)'' | //required// | Already-sanitized keyword | |
| |
| **Returns:** ''(none declared)'' — string | **Returns:** ''(none declared)'' — string |
| Search posts | Search posts |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$keyword'' | ''(untyped)'' | //required// | //none// | | | ''$keyword'' | ''(untyped)'' | //required// | //none// | |
| | ''$page'' | ''(untyped)'' | ''1'' | //none// | | | ''$page'' | ''(untyped)'' | ''1'' | //none// | |
| | ''$perPage'' | ''(untyped)'' | ''10'' | //none// | | | ''$perPage'' | ''(untyped)'' | ''10'' | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| Search pages | Search pages |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$keyword'' | ''(untyped)'' | //required// | //none// | | | ''$keyword'' | ''(untyped)'' | //required// | //none// | |
| | ''$page'' | ''(untyped)'' | ''1'' | //none// | | | ''$page'' | ''(untyped)'' | ''1'' | //none// | |
| | ''$perPage'' | ''(untyped)'' | ''10'' | //none// | | | ''$perPage'' | ''(untyped)'' | ''10'' | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |
| Search both posts and pages | Search both posts and pages |
| |
| ^ Parameter ^ Type ^ Default ^ Description ^ | ^ Parameter ^ Type ^ Default ^ Description ^ |
| | ''$keyword'' | ''(untyped)'' | //required// | //none// | | | ''$keyword'' | ''(untyped)'' | //required// | //none// | |
| | ''$page'' | ''(untyped)'' | ''1'' | //none// | | | ''$page'' | ''(untyped)'' | ''1'' | //none// | |
| | ''$perPage'' | ''(untyped)'' | ''10'' | //none// | | | ''$perPage'' | ''(untyped)'' | ''10'' | //none// | |
| |
| **Returns:** ''(none declared)'' — array | **Returns:** ''(none declared)'' — array |