Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PharDownloader.php

class PharDownloader

Downloader for phar files

@author Kirill chEbba Chebunin <iam@chebba.org>

Hierarchy

  • class \Composer\Downloader\FileDownloader implements \Composer\Downloader\DownloaderInterface, \Composer\Downloader\ChangeReportInterface
    • class \Composer\Downloader\ArchiveDownloader extends \Composer\Downloader\FileDownloader
      • class \Composer\Downloader\PharDownloader extends \Composer\Downloader\ArchiveDownloader

Expanded class hierarchy of PharDownloader

File

vendor/composer/composer/src/Composer/Downloader/PharDownloader.php, line 23

Namespace

Composer\Downloader
View source
class PharDownloader extends ArchiveDownloader {
    
    /**
     * @inheritDoc
     */
    protected function extract(PackageInterface $package, string $file, string $path) : PromiseInterface {
        // Can throw an UnexpectedValueException
        $archive = new \Phar($file);
        $archive->extractTo($path, null, true);
        
        /* TODO: handle openssl signed phars
         * https://github.com/composer/composer/pull/33#issuecomment-2250768
         * https://github.com/koto/phar-util
         * http://blog.kotowicz.net/2010/08/hardening-php-how-to-securely-include.html
         */
        return \React\Promise\resolve(null);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
ArchiveDownloader::$cleanupExecuted protected property
ArchiveDownloader::cleanup public function @inheritDoc Overrides FileDownloader::cleanup
ArchiveDownloader::getInstallOperationAppendix protected function @inheritDoc Overrides FileDownloader::getInstallOperationAppendix
ArchiveDownloader::install public function @inheritDoc Overrides FileDownloader::install
ArchiveDownloader::prepare public function @inheritDoc Overrides FileDownloader::prepare
FileDownloader::$additionalCleanupPaths private property @var array&lt;string, string[]&gt; Map of package name to list of paths
FileDownloader::$cache protected property @var ?Cache
FileDownloader::$config protected property @var Config
FileDownloader::$downloadMetadata public static property @private
@internal
FileDownloader::$eventDispatcher protected property @var ?EventDispatcher
FileDownloader::$filesystem protected property @var Filesystem
FileDownloader::$httpDownloader protected property @var HttpDownloader
FileDownloader::$io protected property @var IOInterface
FileDownloader::$lastCacheWrites private property
FileDownloader::$process protected property @var ProcessExecutor
FileDownloader::$responseHeaders public static property Collects response headers when running on GH Actions
FileDownloader::addCleanupPath protected function
FileDownloader::clearLastCacheWrite protected function
FileDownloader::download public function @inheritDoc Overrides DownloaderInterface::download 2
FileDownloader::getDistPath protected function
FileDownloader::getFileName protected function Gets file name for specific package
FileDownloader::getInstallationSource public function @inheritDoc Overrides DownloaderInterface::getInstallationSource
FileDownloader::getLocalChanges public function @inheritDoc Overrides ChangeReportInterface::getLocalChanges
FileDownloader::processUrl protected function Process the download url
FileDownloader::remove public function @inheritDoc Overrides DownloaderInterface::remove 1
FileDownloader::removeCleanupPath protected function
FileDownloader::update public function @inheritDoc Overrides DownloaderInterface::update
FileDownloader::__construct public function Constructor.
PharDownloader::extract protected function @inheritDoc Overrides ArchiveDownloader::extract

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal