Page MenuHomeDevCentral

EnvTag.php
No OneTemporary

EnvTag.php

<?php
namespace Keruald\Yaml\Tags;
use Keruald\OmniTools\OS\Environment;
/**
* Represents an environment variable
*/
class EnvTag extends Tag {
public function getPrimaryTag () : string {
return "tag:keruald.nasqueron.org,2025:env";
}
public function getPrivateTag () : string {
return "env";
}
/**
* @throws \InvalidArgumentException when the variable does not exist.
*/
public function handle (mixed $data) : string {
$key = (string)$data;
return Environment::get($key);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Jan 31, 17:54 (4 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3375240
Default Alt Text
EnvTag.php (557 B)

Event Timeline