From 2e2b66b16e16d3b67e478c33f601f1ad8c7808c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Ot=C3=A1vio=20Cobucci=20Oblonczyk?= Date: Mon, 19 Aug 2013 04:36:57 -0300 Subject: [PATCH] Package should have download options --- src/Composer/Package/BasePackage.php | 18 ++++++++++++++++++ src/Composer/Package/PackageInterface.php | 14 ++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/Composer/Package/BasePackage.php b/src/Composer/Package/BasePackage.php index a783ca7fc..afc20f4b6 100644 --- a/src/Composer/Package/BasePackage.php +++ b/src/Composer/Package/BasePackage.php @@ -49,6 +49,7 @@ abstract class BasePackage implements PackageInterface protected $repository; protected $id; + protected $options; /** * All descendants' constructors should call this parent constructor @@ -60,6 +61,7 @@ abstract class BasePackage implements PackageInterface $this->prettyName = $name; $this->name = strtolower($name); $this->id = -1; + $this->options = array(); } /** @@ -133,6 +135,22 @@ abstract class BasePackage implements PackageInterface return $this->repository; } + /** + * {@inheritDoc} + */ + public function getOptions() + { + return $this->options; + } + + /** + * {@inheritDoc} + */ + public function setOptions(array $options) + { + $this->options = $options; + } + /** * checks if this package is a platform package * diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php index a3c8a2793..1b1e99707 100644 --- a/src/Composer/Package/PackageInterface.php +++ b/src/Composer/Package/PackageInterface.php @@ -301,4 +301,18 @@ interface PackageInterface * @return array */ public function getArchiveExcludes(); + + /** + * Configures the list of options to download package dist files + * + * @param array $options + */ + public function setOptions(array $options); + + /** + * Returns a list of options to download package dist files + * + * @return array + */ + public function getOptions(); }