blueshoes php application framework and cms            plugins_indexserver
[ class tree: plugins_indexserver ] [ index: plugins_indexserver ] [ all elements ]

Class: Bs_Is_Profile

Source Location: /plugins/indexserver/Bs_Is_Profile.class.php

Class Overview

Bs_Object
   |
   --Bs_Is_Profile

Index Server Profile class.


Author(s):

Version:

  • 4.0.$id$

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 57]
Index Server Profile class.

used to load/persist and work with index server profiles.

example xml structure:

dependencies: XPath




Tags:

copyright:  blueshoes.org
pattern:  singleton: (pseudostatic)
access:  public
version:  4.0.$id$
author:  andrej arn <at blueshoes dot org>


[ Top ]


Class Variables

$profileName =

[line 102]

the unique name of this profile.



Tags:

access:  public

Type:   string


[ Top ]

$_APP =

[line 62]

obvious.


Type:   mixed


[ Top ]

$_indexNumbers =  TRUE

[line 166]

if plain numbers should be indexed or not.

currently they are, before bs4.5 they were ignored.




Tags:

todo:  code that feature.

Type:   mixed


[ Top ]



Class Methods


constructor Bs_Is_Profile [line 172]

Bs_Is_Profile Bs_Is_Profile( )

constructor



[ Top ]

method checkDbTables [line 653]

bool checkDbTables( )

checks that the needed db tables exist and are up-to-date.

the needed changes will be made automatically. note that your user needs the appropriate rights (alter, create, index...)

hint: first try your query, if it fails check the table using this method. if this method returns FALSE then try your query again.




Tags:

return:  (TRUE if table was ok, FALSE if changes have/had to be made.)
todo:  all
throws:  bs_exception
access:  public


[ Top ]

method create [line 334]

bool create( string $profileName, string $xml)

creates a new index.



Tags:

return:  TRUE
throws:  bs_exception
access:  public


Parameters:

string   $profileName  
string   $xml  

[ Top ]

method drop [line 358]

bool drop( string $profileName)

drops an existing index.



Tags:

return:  (TRUE if the index existed and was dropped, FALSE if it did not exist.)
throws:  bs_exception
access:  public


Parameters:

string   $profileName  

[ Top ]

method getFields [line 510]

array getFields( )

returns the field settings array.



Tags:

see:  _fields
access:  public


[ Top ]

method getFieldSetting [line 499]

bool getFieldSetting( string $fieldName, string $setting)

returns information about the field specified.

possible values for $setting are: 'index' 'weight' 'indexFiles' 'indexUrls' 'foreignKey' 'lang' (i think)




Tags:

access:  public


Parameters:

string   $fieldName  
string   $setting   (see above)

[ Top ]

method getIndexDbObj [line 213]

& &getIndexDbObj( )

returns a ref to the db obj used for indexing/searching.



Tags:

return:  instance of Bs_Db
access:  public


[ Top ]

method getProfileName [line 463]

string getProfileName( )

returns the profile name.



Tags:

access:  public


[ Top ]

method getSourceDbString [line 473]

string getSourceDbString( )

returns the dbname.tblname string.



Tags:

access:  public


[ Top ]

method load [line 227]

bool load( string $profileName)

loads the profile specified.



Tags:

return:  (TRUE on success, FALSE if profile does not exist.)
todo:  finish code.
throws:  bs_exception
access:  public


Parameters:

string   $profileName  

[ Top ]

method maxWordLength [line 532]

int maxWordLength( )

tells the maximal word length.



Tags:

see:  var $this->_maxWordLength, Bs_Is_Profile::minWordLength()
access:  public


[ Top ]

method minWordLength [line 521]

int minWordLength( )

tells the required minimal word length.



Tags:

see:  var $this->_minWordLength, Bs_Is_Profile::maxWordLength()
access:  public


[ Top ]

method prune [line 413]

bool prune( string $profileName)

similar to drop() but only removes the content, not the profile itself.



Tags:

return:  (TRUE if the index existed and was pruned, FALSE if it did not exist.)
todo:  check if profile exists, and return FALSE if it does not instead of throwing an exception.
since:  bs4.3
throws:  bs_exception
access:  public


Parameters:

string   $profileName  

[ Top ]

method reset [line 451]

void reset( )

resets the object vars to use this object for a new index.



Tags:

access:  public


[ Top ]

method setDbByDsn [line 197]

bool setDbByDsn( array $dsn)

gives this class a db connection to load/store profiles.



Tags:

return:  TRUE
see:  $this->setDbByObj()
throws:  bs_exception
access:  public


Parameters:

array   $dsn  

[ Top ]

method setDbByObj [line 184]

void setDbByObj( object &$bsDb)

gives this class a db connection to load/store profiles.



Tags:

see:  $this->setDbByDsn()
access:  public


Parameters:

object   &$bsDb  

[ Top ]

method _loadDbFieldStructureHelper [line 603]

void _loadDbFieldStructureHelper( mixed $tblStruct, [mixed $firstCall = TRUE])



[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:11:31 +0100 by phpDocumentor 1.2.3