GIF89; GIF89; %PDF- %PDF-
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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\Repository;
use Composer\Package\AliasPackage;
use Composer\Installer\InstallationManager;
/**
* Writable array repository.
*
* @author Jordi Boggiano <j.boggiano@seld.be>
*/
class WritableArrayRepository extends ArrayRepository implements WritableRepositoryInterface
{
/**
* @var string[]
*/
protected $devPackageNames = array();
/** @var bool|null */
private $devMode = null;
/**
* @return bool|null true if dev requirements were installed, false if --no-dev was used, null if yet unknown
*/
public function getDevMode()
{
return $this->devMode;
}
/**
* @inheritDoc
*/
public function setDevPackageNames(array $devPackageNames)
{
$this->devPackageNames = $devPackageNames;
}
/**
* @inheritDoc
*/
public function getDevPackageNames()
{
return $this->devPackageNames;
}
/**
* @inheritDoc
*/
public function write($devMode, InstallationManager $installationManager)
{
$this->devMode = $devMode;
}
/**
* @inheritDoc
*/
public function reload()
{
$this->devMode = null;
}
/**
* @inheritDoc
*/
public function getCanonicalPackages()
{
$packages = $this->getPackages();
// get at most one package of each name, preferring non-aliased ones
$packagesByName = array();
foreach ($packages as $package) {
if (!isset($packagesByName[$package->getName()]) || $packagesByName[$package->getName()] instanceof AliasPackage) {
$packagesByName[$package->getName()] = $package;
}
}
$canonicalPackages = array();
// unfold aliased packages
foreach ($packagesByName as $package) {
while ($package instanceof AliasPackage) {
$package = $package->getAliasOf();
}
$canonicalPackages[] = $package;
}
return $canonicalPackages;
}
}