SearchTrail class is use to to keep track of filters applied on search results. Its a Wrapper class for criteria that maintains a 'trail' of filters added to the current search.
It is used on places where previous search needed to start new search or filters search criteria based on previous search results. All filters applied on single search safe in the object of this class.
Each criteria is added independent of others, allowing for history, tracking, and subsequently choosing to backup to a previous result, or modify a single criteria filter. This class object would traditionally be used in a client environment such as a website showing the "trail" of filters/criteria applied to achieve the current search results and therefore allow a user to choose to remove or revert criteria. Example (4 criteria added each individually):
Once they've narrowed it down, they may choose they want to expand the results by removing the 3rd criteria item. The interface could allow them to do so, and the SearchTrail object told to remove criteria item #3.
The resultant criteria would then have:
Located in /models/SearchTrail.php (line 62)
Operator contants for absolute attributes.
Contant Query paramter keys for all criteria/filters support by SearchTrail
SearchTrail object contructor.
Add absolute attribute in SearchTrail. Absolute attributes computes by there value and operator.
multiple absolute attribtues are added in AND fashion.
Add attribute id and value in SearchTrail those are use in search. Multiple attributes are added in the SearchTrail by adding $ATTRIBUTE_FILTER in AND fashion.
Add category id in the SearchTrail those are used in search. Multiple categores are added in the SearchTrail by adding $CATEGORY_FILTER_ID in AND fashion.
Add child category id in SearchTrail those are used in search. Child Category are just a collection of category ids those are replaced by category ids when trial is append to WebService request. Its only used to distingush between filters those of normal category criteria or child category criteria.
Add display category id in SearchTrail those are used in search. DiplayCategory are just a collection of category ids those are replaced by category ids when trial is append to WebService request. Its only used to distingush between filters those of normal category criteria or display category criteria.
This method update the SearchTrail with the keyword passed and fitler the result base on that keyword.
It will add keyword along with its required paramter key.
Add manufacturer id in SearchTrail those are used in search. Multiple manufactures are added in the SearchTrail by adding $MANUFACTURER_FILTER_ID in AND fashion.
Add parent category id in SearchTrail those are used in searchParentCategory are just a collection of category ids those are replaced by category ids when trial is append to WebService request. Its only used to distingush between filters those of normal category criteria or parent category criteria.
Clear the SearchTrail. All the filter added in the trail are clear and resets the whole search.
Check that supplied keyword is available in the particular array.
Check that operator is avalable in the gives value.
Return List of Filters/Criteria available in SearchTrail to display.
Return the specific operator present in the given value.
Return url string representation of trail that is use in filtering requests. Its will return all the paramters present in trail irrespective of their types those are meaningful for web service request.
Check that the given trail contains any category filter id. Returns true if the trail contains category filter id else return false.
This method prepare the trail for web service request and replace all child category ids with category ids.
This method prepare the trail for web service request and replace all display category ids with category ids.
This method will collect all keywords from the trail and prepare them to pass to web service request.
The SearchTrail holds keyword in kw parameter that will convert to actuall keyworFilter parameter before sending the paramter string to web service request.
This method prepare the trail for web service request and replace all parent category ids with category ids.
This method is used to remove all paramters those have only used to display there values not used by web service at all.
Remove give filter type from the SearchTrail.
This method will remove any special characters in the SearchTrail generated trialString. Current URLDecoding unable to decode there special charaters.
Return string contaning paramters that are use in filtering requests. This method remove all parameters those are used only to maintains trail filters and distinguish between there types. The results trail that used in Web Service request not requires those parameters.
The Parameter action used to check that the request comming from client is from category filter.
Documentation generated on Wed, 13 Feb 2008 01:57:41 +0500 by phpDocumentor 1.4.0a2