$sid
$sid : string
Base class for all adapters which support the personalisation.
The adapter classes could conceivably be placed in the \Core\Server namespace, but that would potentially discourage fiddling with and extending these classes. The adapters are main components of the external API of this library. Most other classes are just used to make the adapters work.
$configuration : \FACTFinder\Core\ConfigurationInterface
$request : \FACTFinder\Core\Server\Request
$urlBuilder : \FACTFinder\Core\Client\UrlBuilder
$lastResponse : \FACTFinder\Core\Server\Response
__construct(string $loggerClass, \FACTFinder\Core\ConfigurationInterface $configuration, \FACTFinder\Core\Server\Request $request, \FACTFinder\Core\Client\UrlBuilder $urlBuilder, \FACTFinder\Core\AbstractEncodingConverter $encodingConverter = null)
| string | $loggerClass | Class name of logger to use. The class should implement FACTFinder\Util\LoggerInterface. |
| \FACTFinder\Core\ConfigurationInterface | $configuration | Configuration object to use. |
| \FACTFinder\Core\Server\Request | $request | The request object from which to obtain the server data. |
| \FACTFinder\Core\Client\UrlBuilder | $urlBuilder | Client URL builder object to use. |
| \FACTFinder\Core\AbstractEncodingConverter | $encodingConverter | Encoding converter object to use |
getRecommendations() : \FACTFinder\Data\Result
Returns recommendations for IDs previously specified. If no IDs have been set, there will be a warning raised and an empty result will be returned.
getRawRecommendations(string $format = null, string $callback = null) : string
Get the recommendations from FACT-Finder as the string returned by the server.
| string | $format | Optional. Either 'json' or 'jsonp'. Use to overwrite the 'format' parameter. |
| string | $callback | Optional name to overwrite the 'callback' parameter, which determines the name of the callback the response is wrapped in. |
useResponseContentProcessor(object $callable)
Pass in a function to process the response content. This method is not used within the library, but may be convenient when writing custom adapters.
| object | $callable | A function (or invokable object) that processes a single string parameter. |
if $callable is not callable.