소스 검색

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.
     *