Add homepage to MemoryPackage

main
Jordi Boggiano 13 years ago
parent aab9116f67
commit de111b73dd

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

@ -37,6 +37,7 @@ class MemoryPackage extends BasePackage
protected $keywords;
protected $authors;
protected $description;
protected $homepage;
protected $extra = array();
protected $requires = array();
@ -470,6 +471,24 @@ class MemoryPackage extends BasePackage
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
*

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

Loading…
Cancel
Save