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

Breadcrumb

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

class InstallOperation

Solver install operation.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

  • class \Composer\DependencyResolver\Operation\SolverOperation implements \Composer\DependencyResolver\Operation\OperationInterface
    • class \Composer\DependencyResolver\Operation\InstallOperation extends \Composer\DependencyResolver\Operation\SolverOperation implements \Composer\DependencyResolver\Operation\OperationInterface

Expanded class hierarchy of InstallOperation

9 files declare their use of InstallOperation
ArchiveDownloader.php in vendor/composer/composer/src/Composer/Downloader/ArchiveDownloader.php
CreateProjectCommand.php in vendor/composer/composer/src/Composer/Command/CreateProjectCommand.php
FileDownloader.php in vendor/composer/composer/src/Composer/Downloader/FileDownloader.php
InstallationManager.php in vendor/composer/composer/src/Composer/Installer/InstallationManager.php
Installer.php in vendor/composer/composer/src/Composer/Installer.php

... See full list

File

vendor/composer/composer/src/Composer/DependencyResolver/Operation/InstallOperation.php, line 22

Namespace

Composer\DependencyResolver\Operation
View source
class InstallOperation extends SolverOperation implements OperationInterface {
    protected const TYPE = 'install';
    
    /**
     * @var PackageInterface
     */
    protected $package;
    public function __construct(PackageInterface $package) {
        $this->package = $package;
    }
    
    /**
     * Returns package instance.
     */
    public function getPackage() : PackageInterface {
        return $this->package;
    }
    
    /**
     * @inheritDoc
     */
    public function show($lock) : string {
        return self::format($this->package, $lock);
    }
    public static function format(PackageInterface $package, bool $lock = false) : string {
        return ($lock ? 'Locking ' : 'Installing ') . '<info>' . $package->getPrettyName() . '</info> (<comment>' . $package->getFullPrettyVersion() . '</comment>)';
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
InstallOperation::$package protected property
InstallOperation::format public static function
InstallOperation::getPackage public function Returns package instance.
InstallOperation::show public function @inheritDoc Overrides OperationInterface::show
InstallOperation::TYPE protected constant @abstract must be redefined by extending classes Overrides SolverOperation::TYPE
InstallOperation::__construct public function
SolverOperation::getOperationType public function Returns operation type. Overrides OperationInterface::getOperationType
SolverOperation::__toString public function @inheritDoc Overrides OperationInterface::__toString

API Navigation

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