Browse Source

Pool repository index represents priority, highest index = highest priority

Nils Adermann 13 years ago
parent
commit
b52d6d881a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/Composer/DependencyResolver/Pool.php

+ 5 - 0
src/Composer/DependencyResolver/Pool.php

@@ -45,6 +45,11 @@ class Pool
         }
     }
 
+    public function getPriority(RepositoryInterface $repo)
+    {
+        return array_search($repo, $this->repositories, true);
+    }
+
     /**
     * Retrieves the package object for a given package id.
     *