aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-php-rpc/php/stubs/Composer/DependencyResolver/Operation/InstallOperation.php
blob: 6f6757033abc552f22de2523778c502b7d1580dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php

// Generated by scripts/plugin-stub-generator; do not edit by hand.
// Proxy stub for Composer\DependencyResolver\Operation\InstallOperation: the public surface forwards to the Rust-side entity over RPC.

namespace Composer\DependencyResolver\Operation;

use Composer\Package\PackageInterface;

class InstallOperation extends SolverOperation implements OperationInterface
{
    public function __construct(PackageInterface $package)
    {
        [$this->__rhandle, $this->__epoch] = \ShirabeRpcRuntime::callRust(0, '__shirabeConstruct', [static::class, [$package]]);
        \ShirabeRustObjectRegistry::adopt($this->__rhandle, $this);
    }

    protected const TYPE = 'install';

    public static function format(PackageInterface $package, bool $lock = false): string
    {
        return ($lock ? 'Locking ' : 'Installing ').'<info>'.$package->getPrettyName().'</info> (<comment>'.$package->getFullPrettyVersion().'</comment>)';
    }

    public function getPackage(): PackageInterface
    {
        return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getPackage', []);
    }
}