diff --git a/src/Composer/Package/MemoryPackage.php b/src/Composer/Package/MemoryPackage.php index e099417d2..814d6d71d 100644 --- a/src/Composer/Package/MemoryPackage.php +++ b/src/Composer/Package/MemoryPackage.php @@ -22,6 +22,9 @@ class MemoryPackage extends BasePackage protected $type; protected $sourceType; protected $sourceUrl; + protected $distType; + protected $distUrl; + protected $distSha1Checksum; protected $releaseType; protected $version; protected $license; @@ -96,6 +99,54 @@ class MemoryPackage extends BasePackage return $this->sourceUrl; } + /** + * @param string $type + */ + public function setDistType($type) + { + $this->distType = $type; + } + + /** + * {@inheritDoc} + */ + public function getDistType() + { + return $this->distType; + } + + /** + * @param string $url + */ + public function setDistUrl($url) + { + $this->distUrl = $url; + } + + /** + * {@inheritDoc} + */ + public function getDistUrl() + { + return $this->distUrl; + } + + /** + * @param string $url + */ + public function setDistSha1Checksum($sha1checksum) + { + $this->distSha1Checksum = $sha1checksum; + } + + /** + * {@inheritDoc} + */ + public function getDistSha1Checksum() + { + return $this->distSha1Checksum; + } + /** * Set the release type * diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php index 2b747cfe8..2ce324da9 100644 --- a/src/Composer/Package/PackageInterface.php +++ b/src/Composer/Package/PackageInterface.php @@ -69,7 +69,7 @@ interface PackageInterface function getType(); /** - * Returns the repository type of this package, e.g. git, svn, tar + * Returns the repository type of this package, e.g. git, svn * * @return string The repository type */ @@ -82,6 +82,27 @@ interface PackageInterface */ function getSourceUrl(); + /** + * Returns the type of the distribution archive of this version, e.g. zip, tarball + * + * @return string The repository type + */ + function getDistType(); + + /** + * Returns the url of the distribution archive of this version + * + * @return string + */ + function getDistUrl(); + + /** + * Returns the sha1 checksum for the distribution archive of this version + * + * @return string + */ + function getDistSha1Checksum(); + /** * Returns the release type of this package, e.g. stable or beta *