瀏覽代碼

Pool repository index represents priority, highest index = highest priority

Nils Adermann 13 年之前
父節點
當前提交
b52d6d881a
共有 1 個文件被更改,包括 5 次插入0 次删除
  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.
     *