explain $sizeSearchHistory

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@755 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2010-09-26 22:28:54 +00:00
parent 93e5201658
commit 84224c3294

View file

@ -26,6 +26,15 @@
*/
class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_DbService
{
/**
* Size of the search history.
* If the number of logged searches is larger than this,
* adding a new search will delete the oldest one automatically.
*
* Use -1 to deactivate automatic deletion.
*
* @var integer
*/
public $sizeSearchHistory;
@ -49,7 +58,10 @@ class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_DbService
/**
* Creates a new instance
* Creates a new instance.
*
* Sets $this->sizeSearchHistory to $GLOBALS['sizeSearchHistory'] or 10
* if the global variable is not defined.
*
* @param DB $db Database object
*/
@ -67,7 +79,9 @@ class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_DbService
/**
* Adds a new search to the search history
* Adds a new search to the search history.
* Automatically deletes the oldest search when the number of
* searches is larger than $sizeSearchHistory.
*
* @param string $terms Search terms separated by spaces
* @param string $range - 'all' - search was in all bookmarks