[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_finder/helpers/indexer/ -> helper.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 550 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 includes/application.php

Defines 1 class

FinderIndexerHelper:: (11 methods):
  parse()
  tokenize()
  stem()
  addContentType()
  isCommon()
  getCommonWords()
  getDefaultLanguage()
  getPrimaryLanguage()
  getContentPath()
  getContentExtras()
  prepareContent()


Class: FinderIndexerHelper  - X-Ref

Helper class for the Finder indexer package.

parse($input, $format = 'html')   X-Ref
Method to parse input into plain text.

param: string  $input   The raw input.
param: string  $format  The format of the input. [optional]
return: string  The parsed input.

tokenize($input, $lang, $phrase = false)   X-Ref
Method to tokenize a text string.

param: string   $input   The input to tokenize.
param: string   $lang    The language of the input.
param: boolean  $phrase  Flag to indicate whether input could be a phrase. [optional]
return: array  An array of FinderIndexerToken objects.

stem($token, $lang)   X-Ref
Method to get the base word of a token. This method uses the public
{@link FinderIndexerHelper::$stemmer} object if it is set. If no stemmer is set,
the original token is returned.

param: string  $token  The token to stem.
param: string  $lang   The language of the token.
return: string  The root token.

addContentType($title, $mime = null)   X-Ref
Method to add a content type to the database.

param: string  $title  The type of content. For example: PDF
param: string  $mime   The mime type of the content. For example: PDF [optional]
return: integer  The id of the content type.

isCommon($token, $lang)   X-Ref
Method to check if a token is common in a language.

param: string  $token  The token to test.
param: string  $lang   The language to reference.
return: boolean  True if common, false otherwise.

getCommonWords($lang)   X-Ref
Method to get an array of common terms for a language.

param: string  $lang  The language to use.
return: array  Array of common terms.

getDefaultLanguage()   X-Ref
Method to get the default language for the site.

return: string  The default language string.

getPrimaryLanguage($lang)   X-Ref
Method to parse a language/locale key and return a simple language string.

param: string  $lang  The language/locale key. For example: en-GB
return: string  The simple language string. For example: en

getContentPath($url)   X-Ref
Method to get the path (SEF route) for a content item.

param: string  $url  The non-SEF route to the content item.
return: string  The path for the content item.

getContentExtras(FinderIndexerResult &$item)   X-Ref
Method to get extra data for a content before being indexed. This is how
we add Comments, Tags, Labels, etc. that should be available to Finder.

param: FinderIndexerResult  &$item  The item to index as an FinderIndexerResult object.
return: boolean  True on success, false on failure.

prepareContent($text, $params = null)   X-Ref
Method to process content text using the onContentPrepare event trigger.

param: string     $text    The content to process.
param: JRegistry  $params  The parameters object. [optional]
return: string  The processed content.



Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1