Guild find
find a guild information.
<?php require_once('Services/CamelotHerald.php'); $cacheDir = '/tmp/'; $lifeTime = 10800; $herald = new Services_CamelotHerald($cacheDir, $lifeTime); $guild = $herald->findGuild('guildName', 'Lancelot'); print $guild->name; print $guild->guildrp; print $guild->activechars; ... } ?>
Set guild name, server name and execute findGuild(). Method return the details of a guild object ( ex. guildhouse point, stored shield, and characters that guild has. See Services_CamelotHerald_Dto_Guild).
If raise error, Services_CamelotHerald stack Error Object (PEAR_ErrorStack).
And more usage.
<?php $result = $herald->searchGuild('guildName', 'Lancelot'); foreach ($result as $value) { $guild = $herald->findGuild($value); print $guild->name; print $guild->guildrp; } ?>
Set Services_CamelotHerald_Dto_Guild object to this method, you'll get same result.
If you use no cache and get latest data from the server, you use SERVICES_CAMELOTHERALD_FIND_FORCE to the third argument of the findMode flag.
<?php $result = $herald->searchGuild('guildName', 'Lancelot', SERVICES_CAMELOTHERALD_FIND_FORCE); ?>
If you get data from cache only, you use SERVICES_CAMELOTHERALD_FIND_CACHE to the third argument of the findMode flag.
<?php $result = $herald->searchGuild('guildName', 'Lancelot', SERVICES_CAMELOTHERALD_FIND_CACHE); ?>
