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
Fri, Nov 21, 16:34 (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3174327
Default Alt Text
EnvTag.php (557 B)

Event Timeline