sfWurfl Plugin ============== sfWurflPlugin is a plugin for the symfony Web PHP Framework. The plugin bridges the symfony framework and WURFL PHP API library and exposes all available, relevant device information to the developer through the sfWurflDevice class. Installation ------------ * Install the plugin $ symfony plugin:install sfWurflPlugin * Add the `sfWurflDeviceFilter` to your filter chain [yml] # Insert your own filters here ... wurfl_device: { class: sfWurflDeviceFilter } * Change the default WURFL PHP API library directory and config file in your `app.yml` (optional) [yml] all: sf_wurfl: lib_dir: /path/to/wurfl/lib config_file: /path/to/wurfl/config/file * Clear your cache $ symfony cc * Reload the WURFL PHP API cache (recommended) $ symfony wurfl:reload-cache N.B.: if you don't reload the WURFL PHP API cache you will suffer a massive performance hit as the WURFL Device Manager parses and caches the wurfl.xml file. Using The sfWurflDevice Class ----------------------------- The `sfWurflDevice` class encapsulates the WURFL_Device class, which in turn exposes all available information about the device making the request. To get the id of the WURFL record corresponding to the device use [php] sfWurflDevice::getInstance()->getId(); In all other eventualities use [php] sfWurflDevice()::getInstance()->getCapability($capability_name) to get device information. See [WURFL](http://wurfl.sourceforge.net/help_doc.php) for a list and detailed explanation of all capabilities recorded in the WURFL database.