123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <?php
- /*
- * This file is part of Composer.
- *
- * (c) Nils Adermann <naderman@naderman.de>
- * Jordi Boggiano <j.boggiano@seld.be>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Composer\Package;
- /**
- * Package containing additional metadata that is not used by the solver
- *
- * @author Nils Adermann <naderman@naderman.de>
- */
- class CompletePackage extends Package implements CompletePackageInterface
- {
- protected $repositories;
- protected $license = array();
- protected $keywords;
- protected $authors;
- protected $description;
- protected $homepage;
- protected $scripts = array();
- protected $support = array();
- protected $funding = array();
- protected $abandoned = false;
- /**
- * @param array $scripts
- */
- public function setScripts(array $scripts)
- {
- $this->scripts = $scripts;
- }
- /**
- * {@inheritDoc}
- */
- public function getScripts()
- {
- return $this->scripts;
- }
- /**
- * Set the repositories
- *
- * @param array $repositories
- */
- public function setRepositories($repositories)
- {
- $this->repositories = $repositories;
- }
- /**
- * {@inheritDoc}
- */
- public function getRepositories()
- {
- return $this->repositories;
- }
- /**
- * Set the license
- *
- * @param array $license
- */
- public function setLicense(array $license)
- {
- $this->license = $license;
- }
- /**
- * {@inheritDoc}
- */
- public function getLicense()
- {
- return $this->license;
- }
- /**
- * Set the keywords
- *
- * @param array $keywords
- */
- public function setKeywords(array $keywords)
- {
- $this->keywords = $keywords;
- }
- /**
- * {@inheritDoc}
- */
- public function getKeywords()
- {
- return $this->keywords;
- }
- /**
- * Set the authors
- *
- * @param array $authors
- */
- public function setAuthors(array $authors)
- {
- $this->authors = $authors;
- }
- /**
- * {@inheritDoc}
- */
- public function getAuthors()
- {
- 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 homepage
- *
- * @param string $homepage
- */
- public function setHomepage($homepage)
- {
- $this->homepage = $homepage;
- }
- /**
- * {@inheritDoc}
- */
- public function getHomepage()
- {
- return $this->homepage;
- }
- /**
- * Set the support information
- *
- * @param array $support
- */
- public function setSupport(array $support)
- {
- $this->support = $support;
- }
- /**
- * {@inheritDoc}
- */
- public function getSupport()
- {
- return $this->support;
- }
- /**
- * Set the funding
- *
- * @param array $funding
- */
- public function setFunding(array $funding)
- {
- $this->funding = $funding;
- }
- /**
- * {@inheritDoc}
- */
- public function getFunding()
- {
- return $this->funding;
- }
- /**
- * @return bool
- */
- public function isAbandoned()
- {
- return (bool) $this->abandoned;
- }
- /**
- * @param bool|string $abandoned
- */
- public function setAbandoned($abandoned)
- {
- $this->abandoned = $abandoned;
- }
- /**
- * If the package is abandoned and has a suggested replacement, this method returns it
- *
- * @return string|null
- */
- public function getReplacementPackage()
- {
- return is_string($this->abandoned) ? $this->abandoned : null;
- }
- }
|