HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/fabricas.colombiatrade.com.co/vendor2/drush/drush/src/Boot/Kernels.php
<?php

namespace Drush\Boot;

use Drush\Drupal\DrupalKernel as DrushDrupalKernel;
use Drush\Drupal\UpdateKernel as DrushUpdateKernel;
use Drush\Drupal\InstallerKernel as DrushInstallerKernel;

/**
 * Defines the available kernels that can be bootstrapped.
 */
final class Kernels
{

    /**
     * The default kernel that is used on standard requests.
     *
     * @var string
     */
    const DRUPAL = 'drupal';

    /**
     * The kernel that is used during database updates.
     *
     * @var string
     */
    const UPDATE = 'update';

    /**
     * The kernel that is used during site installation.
     *
     * @var string
     */
    const INSTALLER = 'installer';

    /**
     * Returns the available kernels.
     */
    public static function availableKernels()
    {
        return [
            static::DRUPAL,
            static::UPDATE,
            static::INSTALLER,
        ];
    }

    /**
     * Returns the factory method that can be used to retrieve the given kernel.
     *
     * @param string $kernel
     *   The kernel to retrieve.
     *
     * @return callable
     *   The factory method.
     */
    public static function getKernelFactory($kernel)
    {
        $factories = [
            Kernels::DRUPAL => [DrushDrupalKernel::class, 'createFromRequest'],
            Kernels::UPDATE => [DrushUpdateKernel::class, 'createFromRequest'],
            Kernels::INSTALLER => [DrushInstallerKernel::class, 'createFromRequest'],
        ];
        return $factories[$kernel];
    }
}