PHP code example of kerasai / lamp-env
1. Go to this page and download the library: Download kerasai/lamp-env library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kerasai / lamp-env example snippets
namespace MyProject\Env;
use kerasai\LampEnv\Env as BaseEnv;
use kerasai\LampEnv\Hosts\GithubActionsEnvTrait;
use kerasai\LampEnv\Hosts\LandoEnvTrait;
/**
* Detect the environment.
*/
class Env extends BaseEnv {
use GithubActionsEnvTrait;
use LandoEnvTrait;
/**
* {@inheritdoc}
*/
protected function detectInfo(): array {
if ($lando = $this->detectLando()) {
return $lando;
}
return $this->detectGithubActions() ?: parent::detectInfo();
}
}
$env = \MyProject\Env\Env::create();
foreach ($env->getIncludes() as $nclude $filename;
}
}
// Local settings overrides.
if (file_exists(__DIR__ . '/settings.local.php')) {