Search_Mnogosearch
[ class tree: Search_Mnogosearch ] [ index: Search_Mnogosearch ] [ all elements ]

Class: Search_Mnogosearch

Source Location: /Search_Mnogosearch-0.1.1/Mnogosearch.php

Class Overview


MnogoSearch Wrapper.


Author(s):

Version:

  • $Revision: 1.6 $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 120]
MnogoSearch Wrapper.

This class has been tested with PHP 4.3 and MnogoSearch 3.2.18+ with MnogoSearch PHP Extension 1.91.

It is intended to be used in applications where data needs to be separated from template and display.



[ Top ]


Class Variables

$agent =

[line 180]

Mnogosearch Agent object

Type:   mixed


[ Top ]

$query =  ''

[line 175]

Query words to search from $queryParameterName form variable

Type:   mixed


[ Top ]

$searchModeFlag =  false

[line 170]

Is the search mode set already ?

Type:   mixed


[ Top ]

$words = array()

[line 147]

Array of words from the query

Type:   mixed


[ Top ]



Method Detail

Search_Mnogosearch (Constructor)   [line 279]

void Search_Mnogosearch( )

Constructor
  • Access: public

[ Top ]

accept   [line 919]

void accept( Search_Mnogosearch_Renderer &$renderer)

Accepts a renderer
  • Access: public

Parameters:

Search_Mnogosearch_Renderer   &$renderer   —  An Search_Mnogosearch_Renderer object

[ Top ]

addLogicOperators   [line 969]

void addLogicOperators( [ $operators = array()])

Add logic operators which are used by the auto parse feature.
  • Access: public

Parameters:

   $operators   — 

[ Top ]

connect   [line 293]

Search_Mnogosearch connect( string $DBAddr, [array $params = array()])

Creates a new instance of this class.
  • Return: new object of this class.
  • Access: public

Parameters:

string   $DBAddr   —  | array DSN(s) to your database(s). e.g. 'mysql://user:password@localhost/database/?dbmode=multi'
array   $params   —  Presets for mnogosearch agent

[ Top ]

defaultRenderer   [line 953]

Search_Mnogosearch_Renderer defaultRenderer( )

Returns a reference to default renderer object
  • Return: a default renderer object
  • Access: public

[ Top ]

disconnect   [line 823]

void disconnect( )

Free the search agent. After you called this methode you can't use this object any more.
  • Access: public

[ Top ]

query   [line 536]

Search_Mnogosearch_Result|false query( [string $query = ''])

Get query result
  • Return: The result object.
  • Access: public

Parameters:

string   $query   —  A query string.

[ Top ]

setAutoParse   [line 813]

void setAutoParse( bool $bool)

Sets whether to parse the query automatically This will modify the query in order to accomodate boolean operators
  • Access: public

Parameters:

bool   $bool   —  true to set _autoParse on

[ Top ]

setAutowild   [line 376]

void setAutowild( [bool $bool = true])

Set autocompletion of url on/off
  • Access: public

Parameters:

bool   $bool   —  Set this to true if you want autocompletion in url limit search mode

[ Top ]

setFormOptions   [line 646]

void setFormOptions( array $options)

Set options from the submitted form NOT TESTED YET!
  • Access: public

Parameters:

array   $options   —  Submitted values ($_GET or $_POST) array or custom array

[ Top ]

setHttpParameter   [line 389]

void setHttpParameter( string $name, string $value)

Change a single http parameter name
  • Access: public

Parameters:

string   $name   —  name Parameter name
string   $value   —  value The http parameter name

[ Top ]

setHttpParameters   [line 455]

void setHttpParameters( [array $params = array()])

Change the http parameter names
  • Access: public

Parameters:

array   $params   —  The names of the http parameters.

[ Top ]

setLimit   [line 756]

void setLimit( string $name, mixed $value)

Set the search limits in a generic fashion
  • Access: public

Parameters:

string   $name   —  Name of limit tag
mixed   $value   —  Value(s) for limit

[ Top ]

setLimitDate   [line 704]

void setLimitDate( mixed $value)

Set the date search limit

NOT TESTED YET !

This is very specific and might need to be changed to fit your needs. You can also transform the submitted values (from $_GET or $_POST) in order to make a range like this: array('begin' => xxx, 'end' => xxx). Don't set 'end' if you don't need it.

  • Access: public

Parameters:

mixed   $value   —  Value(s) for limit

[ Top ]

setLimits   [line 327]

void setLimits( [array $limits = array()])

Sets all limit parameters in the given array.
  • Access: public

Parameters:

array   $limits   —  limits the limit parameters to set.

[ Top ]

setLimitUrl   [line 727]

void setLimitUrl( mixed $value)

Set the url search limit If autowild is set, then url is autocompleted
  • Access: public

Parameters:

mixed   $value   —  Value(s) for limit

[ Top ]

setParameter   [line 470]

bool setParameter( string $param, mixed $value)

Set an option for this object
  • Return: returns true if parameter was set
  • Access: public

Parameters:

string   $param   —  name of the directive to set
mixed   $value   —  value of the directive to set

[ Top ]

setParameters   [line 314]

void setParameters( [array $params = array()])

Sets all parameters in the given array.
  • Access: public

Parameters:

array   $params   —  the parameters to set.

[ Top ]

setResultFields   [line 403]

void setResultFields( [array $fields = array()])

Set additional result fields.

Additional fields can be defined by the "Section" Parameter in the indexer.conf of mnoGoSearch.

  • Access: public

Parameters:

array   $fields   —  The names of the additional result fields.

[ Top ]

setSectionWeights   [line 430]

void setSectionWeights( [array $weights = array()])

Set the weight factors for Additional fields, which can be defined by the "Section" Parameter in the indexer.conf of mnoGoSearch.

e.g.: $search->setSectionWeights(array(

  1. => '1', // body
  2. => '2', // title
  3. => '2', // keywords
5 => 'A' // Organization (custom) ));

The factor value is a string of hex digits [0-F].

  • Access: public

Parameters:

array   $weights   —  The weight factors for the additional result fields.

[ Top ]

toHtml   [line 938]

string toHtml( )

Returns an HTML version of the result
  • Return: Html version of the form
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:31:31 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.