CWIS Developer Documentation

- Home
- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
Recommender Class Reference
Inheritance diagram for Recommender:
[legend]

## Public Member Functions
| Recommender (&$DB, $ItemTableName, $RatingTableName, $ItemIdFieldName, $UserIdFieldName, $RatingFieldName, $ContentFields)
| DebugLevel ($Setting)
| Recommend ($UserId, $StartingResult=0, $NumberOfResults=10)
| AddResultFilterFunction ($FunctionName)
| NumberOfResults ()
| SearchTime ()
| GetSourceList ($UserId, $RecommendedItemId)
| FindSimilarItems ($ItemId, $FieldList=NULL)
| RecommendFieldValues ($ItemId, $FieldList=NULL)
| UpdateForItems ($StartingItemId, $NumberOfItems)
| UpdateForItem ($ItemId, $FullPass=FALSE)
| DropItem ($ItemId)
| PruneCorrelations ()
| GetItemIds ()
| Retrieve all item IDs. More...
| LoadItemIds ()
| GetFieldData ($ItemId, $FieldName)
| CalculateContentCorrelation ($ItemIdA, $ItemIdB, $FieldList=NULL)
| UpdateContentCorrelation ($ItemIdA, $ItemIdB)
| NormalizeAndParseText ($Text)
| CalcTextCorrelation ($WordsA, $WordsB)
| ContentCorrelation ($ItemIdA, $ItemIdB, $NewCorrelation=-1)
| FilterOnSuppliedFunctions ($Results)

## Public Attributes
const | CONTENTFIELDTYPE_TEXT = 1
const | CONTENTFIELDTYPE_NUMERIC = 2
const | CONTENTFIELDTYPE_CONTROLLEDNAME = 3
const | CONTENTFIELDTYPE_DATE = 4
const | CONTENTFIELDTYPE_DATERAMGE = 5
| $ContentCorrelationThreshold
| $ContentFields
| $ItemTableName
| $RatingTableName
| $ItemIdFieldName
| $UserIdFieldName
| $RatingFieldName
| $ItemIds
| $DB
| $FilterFuncs
| $LastSearchTime
| $NumberOfResultsAvailable
| $DebugLevel

## Detailed Description

Definition at line 11 of file Recommender.php.

## Member Function Documentation

Recommender::AddResultFilterFunction | ( |  | $FunctionName | ) |

Definition at line 145 of file Recommender.php.

Recommender::CalcTextCorrelation | ( |  | $WordsA,
|  |  | $WordsB
| ) |  |

Definition at line 684 of file Recommender.php.

Referenced by CalculateContentCorrelation().

Here is the caller graph for this function:

Recommender::CalculateContentCorrelation | ( |  | $ItemIdA,
|  |  | $ItemIdB,
|  |  | $FieldList = `NULL`
| ) |  |

Definition at line 501 of file Recommender.php.

References $ContentFields, CalcTextCorrelation(), CONTENTFIELDTYPE_CONTROLLEDNAME, CONTENTFIELDTYPE_TEXT, DebugLevel(), and GetFieldData().

Referenced by FindSimilarItems(), and UpdateContentCorrelation().

Here is the caller graph for this function:

Recommender::ContentCorrelation | ( |  | $ItemIdA,
|  |  | $ItemIdB,
|  |  | $NewCorrelation = `-1`
| ) |  |

Definition at line 693 of file Recommender.php.

Referenced by UpdateContentCorrelation().

Here is the caller graph for this function:

Recommender::DebugLevel | ( |  | $Setting | ) |

Definition at line 45 of file Recommender.php.

Referenced by CalculateContentCorrelation(), FindSimilarItems(), Recommend(), Recommender(), RecommendFieldValues(), UpdateContentCorrelation(), UpdateForItem(), and UpdateForItems().

Here is the caller graph for this function:

Recommender::DropItem | ( |  | $ItemId | ) |

Definition at line 403 of file Recommender.php.

Recommender::FilterOnSuppliedFunctions | ( |  | $Results | ) |

Definition at line 745 of file Recommender.php.

Referenced by FindSimilarItems().

Here is the caller graph for this function:

Recommender::FindSimilarItems | ( |  | $ItemId,
|  |  | $FieldList = `NULL`
| ) |  |

Definition at line 199 of file Recommender.php.

References CalculateContentCorrelation(), DebugLevel(), FilterOnSuppliedFunctions(), and LoadItemIds().

Referenced by RecommendFieldValues().

Here is the caller graph for this function:

Recommender::GetFieldData | ( |  | $ItemId,
|  |  | $FieldName
| ) |  |

Definition at line 475 of file Recommender.php.

References NormalizeAndParseText().

Referenced by CalculateContentCorrelation().

Here is the caller graph for this function:

Recommender::GetItemIds | ( |  | ) |

Retrieve all item IDs.

Returns
  Array of item IDs.

Definition at line 429 of file Recommender.php.

References $ItemIds.

Recommender::GetSourceList | ( |  | $UserId,
|  |  | $RecommendedItemId
| ) |  |

Definition at line 164 of file Recommender.php.

Recommender::LoadItemIds | ( |  | ) |

Definition at line 459 of file Recommender.php.

Referenced by FindSimilarItems(), UpdateForItem(), and UpdateForItems().

Here is the caller graph for this function:

Recommender::NormalizeAndParseText | ( |  | $Text | ) |

Definition at line 592 of file Recommender.php.

Referenced by GetFieldData().

Here is the caller graph for this function:

Recommender::NumberOfResults | ( |  | ) |

Definition at line 152 of file Recommender.php.

References $NumberOfResultsAvailable.

Recommender::PruneCorrelations | ( |  | ) |

Definition at line 411 of file Recommender.php.

Recommender::Recommend | ( |  | $UserId,
|  |  | $StartingResult = `0`,
|  |  | $NumberOfResults = `10`
| ) |  |

Definition at line 54 of file Recommender.php.

References $DB, $ItemIdFieldName, $RatingFieldName, and DebugLevel().

Recommender::Recommender | ( | & | $DB,
|  |  | $ItemTableName,
|  |  | $RatingTableName,
|  |  | $ItemIdFieldName,
|  |  | $UserIdFieldName,
|  |  | $RatingFieldName,
|  |  | $ContentFields
| ) |  |

Definition at line 22 of file Recommender.php.

References $ContentFields, $DB, $ItemIdFieldName, $ItemTableName, $RatingFieldName, $RatingTableName, $UserIdFieldName, and DebugLevel().

Referenced by SPTRecommender\SPTRecommender().

Here is the caller graph for this function:

Recommender::RecommendFieldValues | ( |  | $ItemId,
|  |  | $FieldList = `NULL`
| ) |  |

Definition at line 247 of file Recommender.php.

References DebugLevel(), and FindSimilarItems().

Recommender::SearchTime | ( |  | ) |

Definition at line 158 of file Recommender.php.

References $LastSearchTime.

Recommender::UpdateContentCorrelation | ( |  | $ItemIdA,
|  |  | $ItemIdB
| ) |  |

Definition at line 578 of file Recommender.php.

References CalculateContentCorrelation(), ContentCorrelation(), and DebugLevel().

Referenced by UpdateForItem().

Here is the caller graph for this function:

Recommender::UpdateForItem | ( |  | $ItemId,
|  |  | $FullPass = `FALSE`
| ) |  |

Definition at line 380 of file Recommender.php.

References DebugLevel(), LoadItemIds(), and UpdateContentCorrelation().

Referenced by UpdateForItems().

Here is the caller graph for this function:

Recommender::UpdateForItems | ( |  | $StartingItemId,
|  |  | $NumberOfItems
| ) |  |

Definition at line 347 of file Recommender.php.

References DebugLevel(), LoadItemIds(), and UpdateForItem().

## Member Data Documentation

Recommender::$ContentCorrelationThreshold

Definition at line 444 of file Recommender.php.

Recommender::$ContentFields

Definition at line 445 of file Recommender.php.

Referenced by CalculateContentCorrelation(), and Recommender().

Recommender::$DB

Definition at line 452 of file Recommender.php.

Referenced by Recommend(), Recommender(), and SPTRecommender\SPTRecommender().

Recommender::$DebugLevel

Definition at line 456 of file Recommender.php.

Recommender::$FilterFuncs

Definition at line 453 of file Recommender.php.

Recommender::$ItemIdFieldName

Definition at line 448 of file Recommender.php.

Referenced by Recommend(), Recommender(), and SPTRecommender\SPTRecommender().

Recommender::$ItemIds

Definition at line 451 of file Recommender.php.

Referenced by GetItemIds().

Recommender::$ItemTableName

Definition at line 446 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender\SPTRecommender().

Recommender::$LastSearchTime

Definition at line 454 of file Recommender.php.

Referenced by SearchTime().

Recommender::$NumberOfResultsAvailable

Definition at line 455 of file Recommender.php.

Referenced by NumberOfResults().

Recommender::$RatingFieldName

Definition at line 450 of file Recommender.php.

Referenced by Recommend(), Recommender(), and SPTRecommender\SPTRecommender().

Recommender::$RatingTableName

Definition at line 447 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender\SPTRecommender().

Recommender::$UserIdFieldName

Definition at line 449 of file Recommender.php.

Referenced by Recommender(), and SPTRecommender\SPTRecommender().

const Recommender::CONTENTFIELDTYPE_CONTROLLEDNAME = 3

Definition at line 17 of file Recommender.php.

Referenced by CalculateContentCorrelation().

const Recommender::CONTENTFIELDTYPE_DATE = 4

Definition at line 18 of file Recommender.php.

Referenced by SPTRecommender\SPTRecommender().

const Recommender::CONTENTFIELDTYPE_DATERAMGE = 5

Definition at line 19 of file Recommender.php.

const Recommender::CONTENTFIELDTYPE_NUMERIC = 2

Definition at line 16 of file Recommender.php.

Referenced by SPTRecommender\SPTRecommender().

const Recommender::CONTENTFIELDTYPE_TEXT = 1

Definition at line 15 of file Recommender.php.

Referenced by CalculateContentCorrelation(), and SPTRecommender\SPTRecommender().

The documentation for this class was generated from the following file:

- objects/Recommender.php