Add description to MemoryPackage
parent
52a9014f1a
commit
aab9116f67
|
@ -73,6 +73,10 @@ class ArrayLoader
|
||||||
$package->setExtra($config['extra']);
|
$package->setExtra($config['extra']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($config['description']) && is_string($config['description'])) {
|
||||||
|
$package->setDescription($config['description']);
|
||||||
|
}
|
||||||
|
|
||||||
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']));
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ class MemoryPackage extends BasePackage
|
||||||
protected $releaseDate;
|
protected $releaseDate;
|
||||||
protected $keywords;
|
protected $keywords;
|
||||||
protected $authors;
|
protected $authors;
|
||||||
|
protected $description;
|
||||||
protected $extra = array();
|
protected $extra = array();
|
||||||
|
|
||||||
protected $requires = array();
|
protected $requires = array();
|
||||||
|
@ -451,6 +452,24 @@ class MemoryPackage extends BasePackage
|
||||||
return $this->authors;
|
return $this->authors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the description
|
||||||
|
*
|
||||||
|
* @param string $description
|
||||||
|
*/
|
||||||
|
public function setDescription($description)
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
*/
|
||||||
|
public function getDescription()
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the autoload mapping
|
* Set the autoload mapping
|
||||||
*
|
*
|
||||||
|
|
|
@ -272,6 +272,13 @@ interface PackageInterface
|
||||||
*/
|
*/
|
||||||
function getKeywords();
|
function getKeywords();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the package description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function getDescription();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of authors of the package
|
* Returns an array of authors of the package
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue