Skip to content
lobostome edited this page Mar 18, 2013 · 1 revision

The results from the APIs come in different formats. Most often they are either json or xml. The output strategies let you convert those to objects or arrays. Each provider has concrete strategies, and they are specified on the Providers page.

Types of strategies

  1. FurryBear\Output\Strategy\JsonToArray
  2. FurryBear\Output\Strategy\JsonToObject
  3. FurryBear\Output\Strategy\XmlToObject

Register a strategy

$output = new FurryBear\Output\Strategy\JsonToObject();
$fb = new FurryBear\FurryBear();
$fb->registerOutput($output);
Clone this wiki locally