Hi,
I'm working out some kinks in my deploy process. I intend to set 'allowReload(true)' since I will be updating the wurfl.zip on a regular basis. We have multiple servers in a pool that will need the persistence data to be available at once. Is there a programmatic way for me to force WURFL to extract the .zip file?
Thanks!
PHP API method to extract wurfl.zip?
Re: PHP API method to extract wurfl.zip?
I think I'm just going to run something like this in a php via comand line to instantiate WURFL and force the unzip process:
Code: Select all
exec("touch wurfl.zip"); // this will change the timestamp and WURFL will assume it is new and unzip
$wurflConfig = new WURFL_Configuration_InMemoryConfig();
$wurflConfig->persistence('file', array('dir' => $persistenceDir));
$wurflConfig->wurflFile(wurfl.zip);
$wurflConfig->cache('file', array('dir' => $cacheDir, 'expiration' => 36000));
$wurflConfig->matchMode('accuracy');
$wurflConfig->allowReload(true);
$wurlfManagerFactory = new WURFL_WURFLManagerFactory($wurflConfig);
$wurlfManager = $wurlfManagerFactory->create();
Re: PHP API method to extract wurfl.zip?
As long as allowReload is enabled, the WURFL will be reloeded the next time the WURFLManager is created:
This means that you don't really need to touch the wurfl.zip file, since modifying it will change its timestamp, then you can run a script like the one you posted to force the reload.
Code: Select all
$wurlfManager = $wurlfManagerFactory->create();
Thanks,
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Steve Kamerman
ScientiaMobile
Make sure you check out our WURFL Cloud, WURFL InSight and WURFL InFuze products!
Who is online
Users browsing this forum: No registered users and 5 guests