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

Class: SearchEngine

Source Location: /class-search.php

Class SearchEngine

Property Summary
mixed   $albums  
mixed   $album_list  
mixed   $dates  
mixed   $dynalbumname  
mixed   $fieldList  
mixed   $images  
mixed   $lastimagesort  
mixed   $lastsubalbumsort  
mixed   $page  
mixed   $search_structure  
mixed   $whichdates  
mixed   $words  

[ Top ]
Method Summary
SearchEngine   SearchEngine()   Constuctor
array   allowedSearchFields()   Returns an array of the enabled search fields
string   codifySearchString()   recodes the search words replacing the boolean operators with text versions
int   getAlbumIndex()   Returns the index of the album within the search albums
array   getAlbums()   Returns an array of album names found in the search.
object   getImage()   Returns a specific image
int   getImageIndex()   Returns the index of this image in the search images
array   getImages()   Returns an array of images found in the search It will return a "page's worth" if $page is non zero
object   getNextAlbum()   Returns the album following the current one
int   getNumAlbums()   Returns the number of albums found in a search
int   getNumImages()   Returns the number of images found in the search
object   getPrevAlbum()   Returns the album preceding the current one
array   getSearchAlbums()   Returns an array of albums found in the search
string   getSearchDate()   Returns the search dates variable
array   getSearchFieldList()   Returns a list of search fields display names indexed by the search mask
mixed   getSearchFields()   Returns the search fields variable
string   getSearchFieldsText()   Returns the "searchstring" element of a query parameter set
array   getSearchImages()   Returns an array of image names found in the search
array   getSearchNews()   Returns a list of News IDs found in the search
array   getSearchPages()   Returns a list of Pages IDs found in the search
string   getSearchParams()   creates a search query from the search words
array   getSearchString()   Parses a search string Items within quotations are treated as atomic AND, OR and NOT are converted to &, |, and !
string   getSearchWords()   Returns the search words variable
array   numericFields()   converts old style bitmask field spec into field list array
int   parseQueryFields()   Returns the set of fields from the url query/post
string   searchDate()   returns the results of a date search
array   searchFieldsAndTags()   Searches the table for tags Returns an array of database records.
void   setSearchParams()   Parses and stores a search string NOTE!! this function assumes that the 'words' part of the list has been urlencoded!!!

[ Top ]
Properties
mixed   $albums [line 22]

[ Top ]
mixed   $album_list [line 23]

[ Top ]
mixed   $dates [line 17]

[ Top ]
mixed   $dynalbumname [line 24]

[ Top ]
mixed   $fieldList [line 19]

[ Top ]
mixed   $images [line 21]

[ Top ]
mixed   $lastimagesort = NULL [line 26]

[ Top ]
mixed   $lastsubalbumsort = NULL [line 27]

[ Top ]
mixed   $page [line 20]

[ Top ]
mixed   $search_structure [line 25]

[ Top ]
mixed   $whichdates = 'date' [line 18]

[ Top ]
mixed   $words [line 16]

[ Top ]
Methods
Constructor SearchEngine  [line 35]

  SearchEngine SearchEngine( [bool $dynamic_album = false]  )

Constuctor

Parameters:
bool   $dynamic_album:  set true for dynamic albums (limits the search fields)


[ Top ]
allowedSearchFields  [line 104]

  array allowedSearchFields( )

Returns an array of the enabled search fields



[ Top ]
codifySearchString  [line 475]

  string codifySearchString( [string $quote = '"']  )

recodes the search words replacing the boolean operators with text versions

Parameters:
string   $quote:  how to represent quoted strings


[ Top ]
getAlbumIndex  [line 1036]

  int getAlbumIndex( string $curalbum  )

Returns the index of the album within the search albums

Parameters:
string   $curalbum:  The album sought


[ Top ]
getAlbums  [line 1017]

  array getAlbums( [int $page = 0], [string $sorttype = NULL], [string $sortdirection = NULL], [bool $care = false]  )

Returns an array of album names found in the search.

If $page is not zero, it returns the current page's albums

Parameters:
int   $page:  the page number we are on
string   $sorttype:  what to sort on
string   $sortdirection:  what direction
bool   $care:  set to false if the order of the albums does not matter


[ Top ]
getImage  [line 1185]

  object getImage( int $index  )

Returns a specific image

Parameters:
int   $index:  the index of the image desired


[ Top ]
getImageIndex  [line 1165]

  int getImageIndex( string $album, string $filename  )

Returns the index of this image in the search images

Parameters:
string   $album:  The folder name of the image
string   $filename:  the filename of the image


[ Top ]
getImages  [line 1132]

  array getImages( [int $page = 0], [int $firstPageCount = 0], [string $sorttype = NULL], [string $sortdirection = NULL]  )

Returns an array of images found in the search It will return a "page's worth" if $page is non zero

Parameters:
int   $page:  the page number desired
int   $firstPageCount:  count of images that go on the album/image transition page
string   $sorttype:  what to sort on
string   $sortdirection:  what direction


[ Top ]
getNextAlbum  [line 1047]

  object getNextAlbum( string $curalbum  )

Returns the album following the current one

Parameters:
string   $curalbum:  the name of the current album


[ Top ]
getNumAlbums  [line 522]

  int getNumAlbums( )

Returns the number of albums found in a search



[ Top ]
getNumImages  [line 1079]

  int getNumImages( )

Returns the number of images found in the search



[ Top ]
getPrevAlbum  [line 1063]

  object getPrevAlbum( string $curalbum  )

Returns the album preceding the current one

Parameters:
string   $curalbum:  the name of the current album


[ Top ]
getSearchAlbums  [line 982]

  array getSearchAlbums( string $sorttype, string $sortdirection  )

Returns an array of albums found in the search

Parameters:
string   $sorttype:  what to sort on
string   $sortdirection:  what direction


[ Top ]
getSearchDate  [line 254]

  string getSearchDate( )

Returns the search dates variable



[ Top ]
getSearchFieldList  [line 91]

  array getSearchFieldList( )

Returns a list of search fields display names indexed by the search mask



[ Top ]
getSearchFields  [line 266]

  mixed getSearchFields( [bool $array = false]  )

Returns the search fields variable

Parameters:
bool   $array:  set to true to return the fields as array elements. Otherwise a comma delimited string is returned


[ Top ]
getSearchFieldsText  [line 177]

  string getSearchFieldsText( array $fields, [string $param = '&searchfields=']  )

Returns the "searchstring" element of a query parameter set

Parameters:
array   $fields:  the fields required
string   $param:  the query parameter (possibly with the intro character


[ Top ]
getSearchImages  [line 1091]

  array getSearchImages( $sorttype, $sortdirection  )

Returns an array of image names found in the search

Parameters:
   $sorttype: 
   $sortdirection: 


[ Top ]
getSearchNews  [line 1228]

  array getSearchNews( [string $sortorder = "date"], [string $sortdirection = "desc"]  )

Returns a list of News IDs found in the search

Parameters:
string   $sortorder:  "date" for sorting by date (default) "title" for sorting by title
string   $sortdirection:  "desc" (default) for descending sort order "asc" for ascending sort order


[ Top ]
getSearchPages  [line 1202]

  array getSearchPages( )

Returns a list of Pages IDs found in the search



[ Top ]
getSearchParams  [line 142]

  string getSearchParams( [bool $long = true]  )

creates a search query from the search words

Parameters:
bool   $long:  set to false to omit albumname and page parts


[ Top ]
getSearchString  [line 280]

  array getSearchString( )

Parses a search string Items within quotations are treated as atomic AND, OR and NOT are converted to &, |, and !

Returns an array of search elements



[ Top ]
getSearchWords  [line 245]

  string getSearchWords( )

Returns the search words variable



[ Top ]
numericFields  [line 126]

  array numericFields( bit $fields  )

converts old style bitmask field spec into field list array

Parameters:
bit   $fields: 


[ Top ]
parseQueryFields  [line 534]

  int parseQueryFields( )

Returns the set of fields from the url query/post


Information Tags:
Since:  1.1.3

[ Top ]
searchDate  [line 563]

  string searchDate( string $searchstring, string $searchdate, string $tbl, string $sorttype, string $sortdirection, [ $whichdate = 'date']  )

returns the results of a date search

Parameters:
string   $searchstring:  the search target
string   $searchdate:  the date target
string   $tbl:  the database table to search
string   $sorttype:  what to sort on
string   $sortdirection:  what direction
   $whichdate: 

Information Tags:
Since:  1.1.3

[ Top ]
searchFieldsAndTags  [line 686]

  array searchFieldsAndTags( string $searchstring, string $tbl, string $sorttype, string $sortdirection  )

Searches the table for tags Returns an array of database records.

Parameters:
string   $searchstring: 
string   $tbl:  set to 'albums' or 'images'
string   $sorttype:  what to sort on
string   $sortdirection:  what direction


[ Top ]
setSearchParams  [line 195]

  void setSearchParams( string $paramstr  )

Parses and stores a search string NOTE!! this function assumes that the 'words' part of the list has been urlencoded!!!

Parameters:
string   $paramstr:  the string containing the search words


[ Top ]

Documentation generated on Mon, 09 Aug 2010 17:23:49 +0200 by phpDocumentor 1.4.1