瀏覽代碼

Added interfaces.

xaav 13 年之前
父節點
當前提交
f1d7823785

+ 19 - 0
src/Packagist/WebBundle/Repository/Provider/RepositoryProviderInterface.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace Packagist\WebBundle\Repository\Provider;
+
+interface RepositoryProviderInterface
+{
+    /**
+     * Does the provider support the URL?
+     * @param string $url
+     */
+    public function supports($url);
+
+    /**
+     * Get the repository for the URL
+     * @param string $url
+     *
+     */
+    public function getRepository($url);
+}

+ 11 - 0
src/Packagist/WebBundle/Repository/Repository/RepositoryInterface.php

@@ -0,0 +1,11 @@
+<?php
+
+namespace Packagist\WebBundle\Repository\Repository;
+
+interface RepositoryInterface
+{
+    /**
+     * Returns the decoded composer.json file.
+     */
+    public function getComposerFile();
+}