Development

Classes

ArmoryRoster

This is the main class. It contains the method to retrieve the guild members. + retrieveGuildMembers(String $guildName, String $serverName, String $WoWArmoryUrl, String $guildInfoPage, String $memberInfoPage, String $memberReputationPage, String $memberSkillsPage) This method retrieves the guild members either from the armory, or from the cache. - retrieveXMLInformation(String $url) Method to retrieve an xml string from a given url - showAvailableImage(boolean $bool, int $points) This method either shows an image for "available" or "not available" with the points missing.

ArmoryRosterCache

With this class we can handle a file based Member Cache. + ArmoryRosterCache(String $guildName, String $realm, int $cacheUpdateDays) Constructor that will set the values for this instance. - getCacheDate() reads the file information of the current cache file and returns the creation date + readCache() Retrieves the cached member array. + saveCache(Array<Member> $members) Saves the cache file. + updateCacheNeeded() tells, whether the cache is outdated.

ArmoryRosterHelper

+ getCfgValue(String $cfg_name) retrieves the cfg value from the database config table.

FactionReputation

Model class representing a faction and it's reputation

Member

A Model Class for representation of a Member. + addReputationFaction adds a Reputation object to the members array of Reputations + addSkill adds a skill to the members skills array. + getReputationPointsForFaction(String $factionName) returns the reputation points for a certain faction + getValue(String $attributeName) by giving the attributename returns it's value for this member. - compare compares the member to another member

MemberCollection

represents the collection of members for sorting purposes. - _sortMembers() sorts the member array after the given sort attribute. - cmpMembers handle function for each compare of Member objects.

MemberFilter

A MemberFilter can be applied to the member array. It filters a certain attribute to certain values + applyFilter(Member $member) applies this filter to the member. returns true, if this member should still be shown.

MemberFilters

Class to represent the collection of all the filters that are applied to the member array. + addFilter(MemberFilter $filter) adds a new Filter to the filter collection + applyFilters(Array<Member>> $members); applies all added filters to the member array.

Skill

Simple Model class representing a skill (profession etc.)