/**
* Compare two addon's by priority so that they can be sorted.
*
* @param Addon $a The first addon to compare.
* @param Addon $b The second addon to compare.
* @return int Returns -1, 0, or 1.
*/
public static function comparePriority(Addon $a, Addon $b)
{
if ($a->getPriority() > $b->getPriority()) {
return -1;
} elseif ($a->getPriority() < $b->getPriority()) {
return 1;
} else {
return 0;
}
}