Add homepage to MemoryPackage

main
Jordi Boggiano 13 years ago
parent aab9116f67
commit de111b73dd

@ -77,6 +77,10 @@ class ArrayLoader
$package->setDescription($config['description']); $package->setDescription($config['description']);
} }
if (!empty($config['homepage']) && is_string($config['homepage'])) {
$package->setHomepage($config['homepage']);
}
if (!empty($config['keywords'])) { if (!empty($config['keywords'])) {
$package->setKeywords(is_array($config['keywords']) ? $config['keywords'] : array($config['keywords'])); $package->setKeywords(is_array($config['keywords']) ? $config['keywords'] : array($config['keywords']));
} }

@ -37,6 +37,7 @@ class MemoryPackage extends BasePackage
protected $keywords; protected $keywords;
protected $authors; protected $authors;
protected $description; protected $description;
protected $homepage;
protected $extra = array(); protected $extra = array();
protected $requires = array(); protected $requires = array();
@ -470,6 +471,24 @@ class MemoryPackage extends BasePackage
return $this->description; return $this->description;
} }
/**
* Set the homepage
*
* @param string $homepage
*/
public function setHomepage($homepage)
{
$this->homepage = $homepage;
}
/**
* {@inheritDoc}
*/
public function getHomepage()
{
return $this->homepage;
}
/** /**
* Set the autoload mapping * Set the autoload mapping
* *

@ -279,6 +279,13 @@ interface PackageInterface
*/ */
function getDescription(); function getDescription();
/**
* Returns the package homepage
*
* @return string
*/
function getHomepage();
/** /**
* Returns an array of authors of the package * Returns an array of authors of the package
* *

Loading…
Cancel
Save