Solutions Open Source

Référence de la classe tx_indexedsearch

Graphe d'héritage de tx_indexedsearch:

Inheritance graph
[légende]
Graphe de collaboration de tx_indexedsearch:

Collaboration graph
[légende]

Liste de tous les membres

Fonctions membres publiques

 main ($content, $conf)
 initialize ()
 getSearchWords ($defOp)
 procSearchWordsByLexer ($SWArr)
 doSearch ($sWArr)
 getResultRows ($sWArr, $freeIndexUid=-1)
 getResultRows_SQLpointer ($sWArr, $freeIndexUid=-1)
 getDisplayResults ($sWArr, $resData, $freeIndexUid=-1)
 compileResult ($resultRows, $freeIndexUid=-1)
 getPhashList ($sWArr)
 execPHashListQuery ($wordSel, $plusQ='')
 sectionTableWhere ()
 mediaTypeWhere ()
 languageWhere ()
 freeIndexUidWhere ($freeIndexUid)
 execFinalQuery ($list, $freeIndexUid=-1)
 checkResume ($row)
 isDescending ($inverse=FALSE)
 writeSearchStat ($sWArr, $count, $pt)
 makeSearchForm ($optValues)
 renderSelectBoxValues ($value, $optValues)
 printRules ()
 printResultSectionLinks ()
 makeSectionHeader ($id, $sectionTitleLinked, $countResultRows)
 printResultRow ($row, $headerOnly=0)
 pi_list_browseresults ($showResultCount=1, $addString='', $addPart='', $freeIndexUid=-1)
 prepareResultRowTemplateData ($row, $headerOnly)
 tellUsWhatIsSeachedFor ($sWArr)
 wrapSW ($str)
 renderSelectBox ($name, $value, $optValues)
 makePointerSelector_link ($str, $p, $freeIndexUid)
 makeItemTypeIcon ($it, $alt='', $specRowConf)
 makeRating ($row)
 makeDescription ($row, $noMarkup=0, $lgd=180)
 markupSWpartsOfString ($str)
 makeTitle ($row)
 makeInfo ($row, $tmplArray)
 getSpecialConfigForRow ($row)
 makeLanguageIndication ($row)
 makeAccessIndication ($id)
 linkPage ($id, $str, $row=array(), $markUpSwParams=array())
 getRootLine ($id, $pathMP='')
 getFirstSysDomainRecordForPage ($id)
 getPathFromPageId ($id, $pathMP='')
 getMenu ($id)
 multiplePagesType ($item_type)
 utf8_to_currentCharset ($str)
hookRequest ($functionName)

Attributs publics

 $prefixId = 'tx_indexedsearch'
 $scriptRelPath = 'pi/class.tx_indexedsearch.php'
 $extKey = 'indexed_search'
 $join_pages = 0
 $defaultResultNumber = 10
 $operator_translate_table
 $wholeSiteIdList = 0
 $sWArr = array()
 $optValues = array()
 $firstRow = Array()
 $cache_path = array()
 $cache_rl = array()
 $fe_groups_required = array()
 $domain_records = array()
 $wSelClauses = array()
 $resultSections = array()
 $external_parsers = array()
 $iconFileNameCache = array()
 $lexerObj
 $templateCode
 $hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results'


Documentation des fonctions membres

tx_indexedsearch::main ( content,
conf 
)

Main function, called from TypoScript as a USER_INT object.

Paramètres:
string Content input, ignore (just put blank string)
array TypoScript configuration of the plugin!
Renvoie:
string HTML code for the search form / result display.

tx_indexedsearch::initialize (  ) 

Initialize internal variables, especially selector box values for the search form and search words

Renvoie:
void

tx_indexedsearch::getSearchWords ( defOp  ) 

Splits the search word input into an array where each word is represented by an array with key "sword" holding the search word and key "oper" holds the SQL operator (eg. AND, OR)

Only words with 2 or more characters are accepted Max 200 chars total Space is used to split words, "" can be used search for a whole string (not indexed search then) AND, OR and NOT are prefix words, overruling the default operator +/|/- equals AND, OR and NOT as operators. All search words are converted to lowercase.

$defOp is the default operator. 1=OR, 0=AND

Paramètres:
boolean If true, the default operator will be OR, not AND
Renvoie:
array Returns array with search words if any found

tx_indexedsearch::procSearchWordsByLexer ( SWArr  ) 

Post-process the search word array so it will match the words that was indexed (including case-folding if any) If any words are splitted into multiple words (eg. CJK will be!) the operator of the main word will remain.

Paramètres:
array Search word array
Renvoie:
array Search word array, processed through lexer

tx_indexedsearch::doSearch ( sWArr  ) 

Performs the search, the display and writing stats

Paramètres:
array Search words in array, see ->getSearchWords() for details
Renvoie:
string HTML for result display.

tx_indexedsearch::getResultRows ( sWArr,
freeIndexUid = -1 
)

Get search result rows / data from database. Returned as data in array.

Paramètres:
array Search word array
integer Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Renvoie:
array False if no result, otherwise an array with keys for first row, result rows and total number of results found.

tx_indexedsearch::getResultRows_SQLpointer ( sWArr,
freeIndexUid = -1 
)

Gets a SQL result pointer to traverse for the search records.

Paramètres:
array Search words
integer Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Renvoie:
pointer

tx_indexedsearch::getDisplayResults ( sWArr,
resData,
freeIndexUid = -1 
)

Compiles the HTML display of the incoming array of result rows.

Paramètres:
array Search words array (for display of text describing what was searched for)
array Array with result rows, count, first row.
integer Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Renvoie:
string HTML content to display result.

tx_indexedsearch::compileResult ( resultRows,
freeIndexUid = -1 
)

Takes the array with resultrows as input and returns the result-HTML-code Takes the "group" var into account: Makes a "section" or "flat" display.

Paramètres:
array Result rows
integer Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Renvoie:
string HTML

tx_indexedsearch::getPhashList ( sWArr  ) 

Returns a COMPLETE list of phash-integers matching the search-result composed of the search-words in the sWArr array. The list of phash integers are unsorted and should be used for subsequent selection of index_phash records for display of the result.

Paramètres:
array Search word array
Renvoie:
string List of integers

tx_indexedsearch::execPHashListQuery ( wordSel,
plusQ = '' 
)

Returns a query which selects the search-word from the word/rel tables.

Paramètres:
string WHERE clause selecting the word from phash
string Additional AND clause in the end of the query.
Renvoie:
pointer SQL result pointer

tx_indexedsearch::sectionTableWhere (  ) 

Returns AND statement for selection of section in database. (rootlevel 0-2 + page_id)

Renvoie:
string AND clause for selection of section in database.

tx_indexedsearch::mediaTypeWhere (  ) 

Returns AND statement for selection of media type

Renvoie:
string AND statement for selection of media type

tx_indexedsearch::languageWhere (  ) 

Returns AND statement for selection of langauge

Renvoie:
string AND statement for selection of langauge

tx_indexedsearch::freeIndexUidWhere ( freeIndexUid  ) 

Where-clause for free index-uid value.

Paramètres:
integer Free Index UID value to limit search to.
Renvoie:
string WHERE SQL clause part.

tx_indexedsearch::execFinalQuery ( list,
freeIndexUid = -1 
)

Execute final query, based on phash integer list. The main point is sorting the result in the right order.

Paramètres:
string List of phash integers which match the search.
integer Pointer to which indexing configuration you want to search in. -1 means no filtering. 0 means only regular indexed content.
Renvoie:
pointer Query result pointer

tx_indexedsearch::checkResume ( row  ) 

Checking if the resume can be shown for the search result (depending on whether the rights are OK) ? Should it also check for gr_list "0,-1"?

Paramètres:
array Result row array.
Renvoie:
boolean Returns true if resume can safely be shown

tx_indexedsearch::isDescending ( inverse = FALSE  ) 

Returns "DESC" or "" depending on the settings of the incoming highest/lowest result order (piVars['desc']

Paramètres:
boolean If true, inverse the order which is defined by piVars['desc']
Renvoie:
string " DESC" or ""

tx_indexedsearch::writeSearchStat ( sWArr,
count,
pt 
)

Write statistics information to database for the search operation

Paramètres:
array Search Word array
integer Number of hits
integer Milliseconds the search took
Renvoie:
void

tx_indexedsearch::makeSearchForm ( optValues  ) 

Make search form HTML

Paramètres:
array Value/Labels pairs for search form selector boxes.
Renvoie:
string Search form HTML

tx_indexedsearch::renderSelectBoxValues ( value,
optValues 
)

Function, rendering selector box values.

Paramètres:
string Current value
array Array with the options as key=>value pairs
Renvoie:
string <options> imploded.

tx_indexedsearch::printRules (  ) 

Print the searching rules

Renvoie:
string Rules for the search

tx_indexedsearch::printResultSectionLinks (  ) 

Returns the anchor-links to the sections inside the displayed result rows.

Renvoie:
string

tx_indexedsearch::makeSectionHeader ( id,
sectionTitleLinked,
countResultRows 
)

Returns the section header of the search result.

Paramètres:
string ID for the section (used for anchor link)
string Section title with linked wrapped around
integer Number of results in section
Renvoie:
string HTML output

tx_indexedsearch::printResultRow ( row,
headerOnly = 0 
)

This prints a single result row, including a recursive call for subrows.

Paramètres:
array Search result row
integer 1=Display only header (for sub-rows!), 2=nothing at all
Renvoie:
string HTML code

tx_indexedsearch::pi_list_browseresults ( showResultCount = 1,
addString = '',
addPart = '',
freeIndexUid = -1 
)

Returns a results browser

Paramètres:
boolean Show result count
string String appended to "displaying results..." notice.
string String appended after section "displaying results..."
string List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
Renvoie:
string HTML output

tx_indexedsearch::prepareResultRowTemplateData ( row,
headerOnly 
)

Preparing template data for the result row output

Paramètres:
array Result row
boolean If set, display only header of result (for sub-results)
Renvoie:
array Array with data to insert in result row template

tx_indexedsearch::tellUsWhatIsSeachedFor ( sWArr  ) 

Returns a string that tells which search words are searched for.

Paramètres:
array Array of search words
Renvoie:
string HTML telling what is searched for.

tx_indexedsearch::wrapSW ( str  ) 

Wraps the search words in the search-word list display (from ->tellUsWhatIsSeachedFor())

Paramètres:
string search word to wrap (in local charset!)
Renvoie:
string Search word wrapped in tag.

tx_indexedsearch::renderSelectBox ( name,
value,
optValues 
)

Makes a selector box

Paramètres:
string Name of selector box
string Current value
array Array of options in the selector box (value => label pairs)
Renvoie:
string HTML of selector box

tx_indexedsearch::makePointerSelector_link ( str,
p,
freeIndexUid 
)

Used to make the link for the result-browser. Notice how the links must resubmit the form after setting the new pointer-value in a hidden formfield.

Paramètres:
string String to wrap in tag
integer Pointer value
string List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
Renvoie:
string Input string wrapped in tag with onclick event attribute set.

tx_indexedsearch::makeItemTypeIcon ( it,
alt = '',
specRowConf 
)

Return icon for file extension

Paramètres:
string File extension / item type
string Title attribute value in icon.
array TypoScript configuration specifically for search result.
Renvoie:
string tag for icon

tx_indexedsearch::makeRating ( row  ) 

Return the rating-HTML code for the result row. This makes use of the $this->firstRow

Paramètres:
array Result row array
Renvoie:
string String showing ranking value

tx_indexedsearch::makeDescription ( row,
noMarkup = 0,
lgd = 180 
)

Returns the resume for the search-result.

Paramètres:
array Search result row
boolean If noMarkup is false, then the index_fulltext table is used to select the content of the page, split it with regex to display the search words in the text.
integer String length
Renvoie:
string HTML string ...

tx_indexedsearch::markupSWpartsOfString ( str  ) 

Marks up the search words from $this->sWarr in the $str with a color.

Paramètres:
string Text in which to find and mark up search words. This text is assumed to be UTF-8 like the search words internally is.
Renvoie:
string Processed content.

tx_indexedsearch::makeTitle ( row  ) 

Returns the title of the search result row

Paramètres:
array Result row
Renvoie:
string Title from row

tx_indexedsearch::makeInfo ( row,
tmplArray 
)

Returns the info-string in the bottom of the result-row display (size, dates, path)

Paramètres:
array Result row
array Template array to modify
Renvoie:
array Modified template array

tx_indexedsearch::getSpecialConfigForRow ( row  ) 

Returns configuration from TypoScript for result row based on ID / location in page tree!

Paramètres:
array Result row
Renvoie:
array Configuration array

tx_indexedsearch::makeLanguageIndication ( row  ) 

Returns the HTML code for language indication.

Paramètres:
array Result row
Renvoie:
string HTML code for result row.

tx_indexedsearch::makeAccessIndication ( id  ) 

Returns the HTML code for the locking symbol. NOTICE: Requires a call to ->getPathFromPageId() first in order to work (done in ->makeInfo() by calling that first)

Paramètres:
integer Page id for which to find answer
Renvoie:
string tag if access is limited.

tx_indexedsearch::linkPage ( id,
str,
row = array(),
markUpSwParams = array() 
)

Links the $str to page $id

Paramètres:
integer Page id
string Title String to link
array Result row
array Additional parameters for marking up seach words
Renvoie:
string tag wrapped title string.

tx_indexedsearch::getRootLine ( id,
pathMP = '' 
)

Returns the path to the page $id

Paramètres:
integer Page ID
string MP variable content.
Renvoie:
string Root line for result.

tx_indexedsearch::getFirstSysDomainRecordForPage ( id  ) 

Gets the first sys_domain record for the page, $id

Paramètres:
integer Page id
Renvoie:
string Domain name

tx_indexedsearch::getPathFromPageId ( id,
pathMP = '' 
)

Returns the path to the page $id

Paramètres:
integer Page ID
string MP variable content
Renvoie:
string Path

tx_indexedsearch::getMenu ( id  ) 

Return the menu of pages used for the selector.

Paramètres:
integer Page ID for which to return menu
Renvoie:
array Menu items (for making the section selector box)

tx_indexedsearch::multiplePagesType ( item_type  ) 

Returns if an item type is a multipage item type

Paramètres:
string Item type
Renvoie:
boolean True if multipage capable

tx_indexedsearch::utf8_to_currentCharset ( str  ) 

Converts the input string from utf-8 to the backend charset.

Paramètres:
string String to convert (utf-8)
Renvoie:
string Converted string (backend charset if different from utf-8)

& tx_indexedsearch::hookRequest ( functionName  ) 

Returns an object reference to the hook object if any

Paramètres:
string Name of the function you want to call / hook key
Renvoie:
object Hook object, if any. Otherwise null.


Documentation des données membres

tx_indexedsearch::$prefixId = 'tx_indexedsearch'

Réimplémentée à partir de tslib_pibase.

tx_indexedsearch::$scriptRelPath = 'pi/class.tx_indexedsearch.php'

Réimplémentée à partir de tslib_pibase.

tx_indexedsearch::$extKey = 'indexed_search'

Réimplémentée à partir de tslib_pibase.

tx_indexedsearch::$join_pages = 0

tx_indexedsearch::$defaultResultNumber = 10

tx_indexedsearch::$operator_translate_table

Valeur initiale :

 Array (                // case-sensitive. Defines the words, which will be operators between words
                Array ('+' , 'AND'),
                Array ('|' , 'OR'),
                Array ('-' , 'AND NOT'),
                        // english
#               Array ('AND' , 'AND'),
#               Array ('OR' , 'OR'),
#               Array ('NOT' , 'AND NOT'),
        )

tx_indexedsearch::$wholeSiteIdList = 0

tx_indexedsearch::$sWArr = array()

tx_indexedsearch::$optValues = array()

tx_indexedsearch::$firstRow = Array()

tx_indexedsearch::$cache_path = array()

tx_indexedsearch::$cache_rl = array()

tx_indexedsearch::$fe_groups_required = array()

tx_indexedsearch::$domain_records = array()

tx_indexedsearch::$wSelClauses = array()

tx_indexedsearch::$resultSections = array()

tx_indexedsearch::$external_parsers = array()

tx_indexedsearch::$iconFileNameCache = array()

tx_indexedsearch::$lexerObj

tx_indexedsearch::$templateCode

tx_indexedsearch::$hiddenFieldList = 'ext, type, defOp, media, order, group, lang, desc, results'


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:43:48 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3