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

Class: SearchEngine

Source Location: /class-search.php

Class SearchEngine

Property Summary
mixed   $album  
mixed   $albums  
mixed   $album_list  
mixed   $articles  
mixed   $category_list  
mixed   $dates  
mixed   $dynalbumname  
mixed   $extraparams  
mixed   $fieldList  
mixed   $images  
mixed   $iteration  
mixed   $loaded  
mixed   $page  
mixed   $pages  
mixed   $pattern  
mixed   $processed_search  
mixed   $searches  
mixed   $search_no_albums  
mixed   $search_no_images  
mixed   $search_no_news  
mixed   $search_no_pages  
mixed   $search_structure  
mixed   $search_unpublished  
mixed   $table  
mixed   $tagPattern  
mixed   $transient  
mixed   $whichdates  
mixed   $words  

[ Top ]
Method Summary
static void   compressedIDList()   Takes a list of IDs and makes a where clause
SearchEngine   __construct()   Constuctor
array   allowedSearchFields()   Returns an array of the enabled search fields
void   clearSearchWords()  
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
void   getAlbumList()   return the list of albums found
array   getAlbums()   Returns an array of album names found in the search.
array   getArticles()   Returns a list of News Titlelinks found in the search
void   getCacheTag()   creates a unique id for a search
void   getCategoryList()   return the list of categories found
void   getDynamicAlbum()  
number   getID()   mimic an album object
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
array   getPages()   Returns pages from a search
object   getPrevAlbum()   Returns the album preceding the current one
string   getSearchDate()   Returns the search dates variable
array   getSearchExtra()   Retrieves search extra parameters
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
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   setSearchExtra()   Stores extra search params for plugin use
void   setSearchParams()   Parses and stores a search string NOTE!! this function assumes that the 'words' part of the list has been urlencoded!!!
void   setSearchUnpublished()  
void   setSortDirection()   sets sort directions
void   setSortType()   Stores the sort type
array   sortKey()   get connical sort key and direction parameters.
void   subsetNewsCategories()   Returns an array of News article IDs belonging to the search categories

[ Top ]
Properties
mixed   $album = NULL [line 28]
API Tags:
Access:  protected


[ Top ]
mixed   $albums = NULL [line 21]

[ Top ]
mixed   $album_list = NULL [line 40]
API Tags:
Access:  protected


[ Top ]
mixed   $articles = NULL [line 22]

[ Top ]
mixed   $category_list = NULL [line 41]
API Tags:
Access:  protected


[ Top ]
mixed   $dates [line 30]
API Tags:
Access:  protected


[ Top ]
mixed   $dynalbumname = NULL [line 27]
API Tags:
Access:  protected


[ Top ]
mixed   $extraparams = array() [line 43]
API Tags:
Access:  protected


[ Top ]
mixed   $fieldList = NULL [line 18]

[ Top ]
mixed   $images = NULL [line 20]

[ Top ]
mixed   $iteration = 0 [line 38]
API Tags:
Access:  protected


[ Top ]
mixed   $loaded = false [line 45]

[ Top ]
mixed   $page = 1 [line 19]

[ Top ]
mixed   $pages = NULL [line 23]

[ Top ]
mixed   $pattern [line 24]

[ Top ]
mixed   $processed_search = NULL [line 39]
API Tags:
Access:  protected


[ Top ]
mixed   $searches = NULL [line 42]
API Tags:
Access:  protected


[ Top ]
mixed   $search_no_albums = false [line 32]
API Tags:
Access:  protected


[ Top ]
mixed   $search_no_images = false [line 33]
API Tags:
Access:  protected


[ Top ]
mixed   $search_no_news = false [line 35]
API Tags:
Access:  protected


[ Top ]
mixed   $search_no_pages = false [line 34]
API Tags:
Access:  protected


[ Top ]
mixed   $search_structure [line 37]
API Tags:
Access:  protected


[ Top ]
mixed   $search_unpublished = false [line 36]
API Tags:
Access:  protected


[ Top ]
mixed   $table = 'albums' [line 46]

[ Top ]
mixed   $tagPattern [line 25]

[ Top ]
mixed   $transient = true [line 47]

[ Top ]
mixed   $whichdates = 'date' [line 31]
API Tags:
Access:  protected


[ Top ]
mixed   $words [line 29]
API Tags:
Access:  protected


[ Top ]
Methods
static method compressedIDList  [line 843]

  static void compressedIDList( array $idlist  )

Takes a list of IDs and makes a where clause

Parameters:
array   $idlist:  list of IDs for a where clause

API Tags:
Access:  protected


[ Top ]
Constructor __construct  [line 55]

  SearchEngine __construct( [bool $dynamic_album = false]  )

Constuctor

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


[ Top ]
allowedSearchFields  [line 235]

  array allowedSearchFields( )

Returns an array of the enabled search fields



[ Top ]
clearSearchWords  [line 1854]

  void clearSearchWords( )



[ Top ]
codifySearchString  [line 730]

  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 1460]

  int getAlbumIndex( string $curalbum  )

Returns the index of the album within the search albums

Parameters:
string   $curalbum:  The album sought


[ Top ]
getAlbumList  [line 1688]

  void getAlbumList( )

return the list of albums found



[ Top ]
getAlbums  [line 1444]

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

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
bool   $mine:  set true/false to override ownership


[ Top ]
getArticles  [line 1785]

  array getArticles( [int $articles_per_page = 0], [bool $published = NULL], [bool $ignorepagination = false], [string $sorttype = NULL], [string $sortdirection = NULL]  )

Returns a list of News Titlelinks found in the search

Parameters:
int   $articles_per_page:  The number of articles to get
bool   $published:  placeholder for consistent parameter list
bool   $ignorepagination:  ignore pagination
string   $sorttype:  field to sort on
string   $sortdirection:  sort order


[ Top ]
getCacheTag  [line 1866]

  void getCacheTag( string $table, string $search, string $sort  )

creates a unique id for a search

Parameters:
string   $table:  Database table
string   $search:  Search string
string   $sort:  Sort criteria

API Tags:
Access:  protected


[ Top ]
getCategoryList  [line 1696]

  void getCategoryList( )

return the list of categories found



[ Top ]
getDynamicAlbum  [line 1680]

  void getDynamicAlbum( )



[ Top ]
getID  [line 211]

  number getID( )

mimic an album object



[ Top ]
getImage  [line 1668]

  object getImage( int $index  )

Returns a specific image

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


[ Top ]
getImageIndex  [line 1650]

  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 1617]

  array getImages( [int $page = 0], [int $firstPageCount = 0], [string $sorttype = NULL], [string $sortdirection = NULL], [bool $care = true], [bool $mine = 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
bool   $care:  placeholder to make the getImages methods all the same.
bool   $mine:  set true/false to overried ownership


[ Top ]
getNextAlbum  [line 1471]

  object getNextAlbum( string $curalbum  )

Returns the album following the current one

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


[ Top ]
getNumAlbums  [line 767]

  int getNumAlbums( )

Returns the number of albums found in a search



[ Top ]
getNumImages  [line 1502]

  int getNumImages( )

Returns the number of images found in the search



[ Top ]
getPages  [line 1711]

  array getPages( [bool $published = NULL], [bool $toplevel = false], [int $number = NULL], [string $sorttype = NULL], [strng $sortdirection = NULL]  )

Returns pages from a search

Parameters:
bool   $published:  ignored, left for parameter compatibility
bool   $toplevel:  ignored, left for parameter compatibility
int   $number:  ignored, left for parameter compatibility
string   $sorttype:  the sort key
strng   $sortdirection:  the sort order


[ Top ]
getPrevAlbum  [line 1487]

  object getPrevAlbum( string $curalbum  )

Returns the album preceding the current one

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


[ Top ]
getSearchDate  [line 504]

  string getSearchDate( )

Returns the search dates variable



[ Top ]
getSearchExtra  [line 335]

  array getSearchExtra( )

Retrieves search extra parameters



[ Top ]
getSearchFieldList  [line 220]

  array getSearchFieldList( )

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



[ Top ]
getSearchFields  [line 516]

  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 380]

  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 ]
getSearchParams  [line 278]

  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 531]

  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 495]

  string getSearchWords( )

Returns the search words variable



[ Top ]
numericFields  [line 257]

  array numericFields( bit $fields  )

converts old style bitmask field spec into field list array

Parameters:
bit   $fields: 

API Tags:
Access:  protected


[ Top ]
parseQueryFields  [line 779]

  int parseQueryFields( )

Returns the set of fields from the url query/post


Information Tags:
Since:  1.1.3

[ Top ]
searchDate  [line 886]

  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 1009]

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

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

Parameters:
array   $searchstring: 
string   $tbl:  set DB table name to be searched
string   $sorttype:  what to sort on
string   $sortdirection:  what direction

API Tags:
Access:  protected


[ Top ]
setSearchExtra  [line 344]

  void setSearchExtra( array $extra  )

Stores extra search params for plugin use

Parameters:
array   $extra: 


[ Top ]
setSearchParams  [line 398]

  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 ]
setSearchUnpublished  [line 486]

  void setSearchUnpublished( )



[ Top ]
setSortDirection  [line 355]

  void setSortDirection( bool $val, [string $what = 'images']  )

sets sort directions

Parameters:
bool   $val:  the direction
string   $what:  'images' if you want the image direction, 'albums' if you want it for the album


[ Top ]
setSortType  [line 369]

  void setSortType( string $sorttype, [string $what = 'images']  )

Stores the sort type

Parameters:
string   $sorttype:  the sort type
string   $what:  'images' or 'albums'


[ Top ]
sortKey  [line 857]

  array sortKey( type $sorttype, type $sortdirection, type $defaulttype, type $table  )

get connical sort key and direction parameters.

Parameters:
type   $sorttype:  sort field desired
type   $sortdirection:  DESC or ASC
type   $defaulttype:  if no sort type otherwise selected use this one
type   $table:  the database table being searched

API Tags:
Access:  protected


[ Top ]
subsetNewsCategories  [line 802]

  void subsetNewsCategories( )

Returns an array of News article IDs belonging to the search categories


API Tags:
Access:  protected


[ Top ]

Documentation generated on Sat, 07 Jun 2014 18:03:17 +0200 by phpDocumentor 1.4.3