Преглед изворни кода

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