Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Created December 3, 2015 21:52
Show Gist options
  • Save samueleresca/1b937131e96b3c131299 to your computer and use it in GitHub Desktop.
Save samueleresca/1b937131e96b3c131299 to your computer and use it in GitHub Desktop.
// wurflSetup.php file
error_reporting ( E_ALL );
define ( "WURFL_DIR" , dirname ( __FILE__ ) . '/wurfl/WURFL/' );
define ( "RESOURCES_DIR" , dirname ( __FILE__ ) . "/wurfl/examples/resources/" );
require_once WURFL_DIR . 'Application.php';
function getWurflManager() {
$config_file = RESOURCES_DIR . 'wurfl-config.xml';
$wurfl_config = new WURFL_Configuration_XmlConfig ($config_file );
$wurflManagerFactory = new WURFL_WURFLManagerFactory ( $wurfl_config );
return $wurflManagerFactory->create ();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment