/**
  * User function for sorting
  *
  * @param AJXP_Plugin $pluginA
  * @param AJXP_Plugin $pluginB
  * @return integer
  */
 private function sortByDependency($pluginA, $pluginB)
 {
     //var_dump("Checking " . $pluginA->getId() . " vs " . $pluginB->getId());
     if ($pluginA->getId() == $pluginB->getId()) {
         //var_dump("should not check");
         return 0;
     }
     if ($pluginA->dependsOn($pluginB->getId())) {
         return 1;
     }
     if ($pluginB->dependsOn($pluginA->getId())) {
         return -1;
     }
     return 0;
 }
 /**
  * User function for sorting
  *
  * @param AJXP_Plugin $pluginA
  * @param AJXP_Plugin $pluginB
  */
 private function sortByDependency($pluginA, $pluginB)
 {
     if ($pluginA->dependsOn($pluginB->getId())) {
         return 1;
     }
     if ($pluginB->dependsOn($pluginA->getId())) {
         return -1;
     }
     return 0;
 }