2011-04-17 22:14:44 +00:00
|
|
|
<?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;
|
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
use Composer\Package\PackageInterface;
|
2011-10-01 12:33:43 +00:00
|
|
|
use Composer\Package\Locker;
|
2011-09-25 18:00:26 +00:00
|
|
|
use Composer\Repository\RepositoryManager;
|
|
|
|
use Composer\Installer\InstallationManager;
|
|
|
|
use Composer\Downloader\DownloadManager;
|
2011-04-17 22:14:44 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Jordi Boggiano <j.boggiano@seld.be>
|
2011-09-16 19:14:06 +00:00
|
|
|
* @author Konstantin Kudryashiv <ever.zet@gmail.com>
|
2011-04-17 22:14:44 +00:00
|
|
|
*/
|
|
|
|
class Composer
|
|
|
|
{
|
2011-09-14 12:57:40 +00:00
|
|
|
const VERSION = '1.0.0-DEV';
|
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
private $package;
|
2011-10-01 12:33:43 +00:00
|
|
|
private $locker;
|
2011-04-17 22:14:44 +00:00
|
|
|
|
2011-09-25 21:19:12 +00:00
|
|
|
private $repositoryManager;
|
|
|
|
private $downloadManager;
|
|
|
|
private $installationManager;
|
2011-04-17 22:14:44 +00:00
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function setPackage(PackageInterface $package)
|
|
|
|
{
|
|
|
|
$this->package = $package;
|
|
|
|
}
|
2011-04-17 22:14:44 +00:00
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function getPackage()
|
|
|
|
{
|
|
|
|
return $this->package;
|
2011-04-17 22:14:44 +00:00
|
|
|
}
|
|
|
|
|
2011-10-01 12:33:43 +00:00
|
|
|
public function setLocker(Locker $locker)
|
2011-04-17 22:14:44 +00:00
|
|
|
{
|
2011-10-01 12:33:43 +00:00
|
|
|
$this->locker = $locker;
|
2011-09-25 18:00:26 +00:00
|
|
|
}
|
2011-09-16 19:14:06 +00:00
|
|
|
|
2011-10-01 12:33:43 +00:00
|
|
|
public function getLocker()
|
2011-09-25 18:00:26 +00:00
|
|
|
{
|
2011-10-01 12:33:43 +00:00
|
|
|
return $this->locker;
|
2011-04-17 22:14:44 +00:00
|
|
|
}
|
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function setRepositoryManager(RepositoryManager $manager)
|
2011-04-17 22:14:44 +00:00
|
|
|
{
|
2011-09-25 21:19:12 +00:00
|
|
|
$this->repositoryManager = $manager;
|
2011-09-25 18:00:26 +00:00
|
|
|
}
|
2011-09-16 19:14:06 +00:00
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function getRepositoryManager()
|
|
|
|
{
|
2011-09-25 21:19:12 +00:00
|
|
|
return $this->repositoryManager;
|
2011-09-25 18:00:26 +00:00
|
|
|
}
|
2011-04-17 22:14:44 +00:00
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function setDownloadManager(DownloadManager $manager)
|
|
|
|
{
|
2011-09-25 21:19:12 +00:00
|
|
|
$this->downloadManager = $manager;
|
2011-04-17 22:14:44 +00:00
|
|
|
}
|
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function getDownloadManager()
|
2011-04-17 22:14:44 +00:00
|
|
|
{
|
2011-09-25 21:19:12 +00:00
|
|
|
return $this->downloadManager;
|
2011-09-25 18:00:26 +00:00
|
|
|
}
|
2011-06-28 18:42:02 +00:00
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function setInstallationManager(InstallationManager $manager)
|
|
|
|
{
|
2011-09-25 21:19:12 +00:00
|
|
|
$this->installationManager = $manager;
|
2011-09-16 19:14:06 +00:00
|
|
|
}
|
2011-06-28 18:42:02 +00:00
|
|
|
|
2011-09-25 18:00:26 +00:00
|
|
|
public function getInstallationManager()
|
2011-09-16 19:14:06 +00:00
|
|
|
{
|
2011-09-25 21:19:12 +00:00
|
|
|
return $this->installationManager;
|
2011-04-17 22:14:44 +00:00
|
|
|
}
|
2011-09-17 11:18:34 +00:00
|
|
|
}
|