\thinkEnv

Summary

Methods
Properties
Constants
__construct()
load()
get()
set()
No public properties found
No constants found
getEnv()
$data
N/A
No private methods found
No private properties found
N/A

Properties

$data

$data : array

环境变量数据

Type

array

Methods

__construct()

__construct() : mixed

Returns

mixed —

load()

load(string  $file) : void

读取环境变量定义文件

Parameters

string $file

环境变量定义文件

get()

get(string  $name = null, mixed  $default = null, mixed  $php_prefix = true) : mixed

获取环境变量值

Parameters

string $name

环境变量名

mixed $default

默认值

mixed $php_prefix

Returns

mixed —

set()

set(string|array  $env, mixed  $value = null) : void

设置环境变量值

Parameters

string|array $env

环境变量

mixed $value

getEnv()

getEnv(mixed  $name, mixed  $default = null, mixed  $php_prefix = true) : mixed

Parameters

mixed $name
mixed $default
mixed $php_prefix

Returns

mixed —