\think\facadeEnv

Summary

Methods
Properties
Constants
__callStatic()
load()
get()
set()
has()
__set()
__get()
__isset()
offsetSet()
offsetExists()
offsetUnset()
offsetGet()
No public properties found
No constants found
getFacadeClass()
createFacade()
$alwaysNewInstance
$instance
N/A
No private methods found
No private properties found
N/A

Properties

$alwaysNewInstance

$alwaysNewInstance : bool

始终创建新的对象实例

Type

bool

$instance

$instance

Methods

__callStatic()

__callStatic(mixed  $method, mixed  $params) : mixed

Parameters

mixed $method
mixed $params

Returns

mixed —

load()

load(string  $file) : void

读取环境变量定义文件

Parameters

string $file

get()

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

获取环境变量值

Parameters

string $name = null
mixed $default = null

Returns

mixed —

set()

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

设置环境变量值

Parameters

string|array $env
mixed $value = null

has()

has(string  $name) : bool

检测是否存在环境变量

Parameters

string $name

Returns

bool —

__set()

__set(string  $name, mixed  $value) : void

设置环境变量

Parameters

string $name
mixed $value

__get()

__get(string  $name) : mixed

获取环境变量

Parameters

string $name

Returns

mixed —

__isset()

__isset(string  $name) : bool

检测是否存在环境变量

Parameters

string $name

Returns

bool —

offsetSet()

offsetSet(mixed  $name, mixed  $value) : void

Parameters

mixed $name
mixed $value

offsetExists()

offsetExists(mixed  $name) : bool

Parameters

mixed $name

Returns

bool —

offsetUnset()

offsetUnset(mixed  $name) : mixed

Parameters

mixed $name

Returns

mixed —

offsetGet()

offsetGet(mixed  $name) : mixed

Parameters

mixed $name

Returns

mixed —

getFacadeClass()

getFacadeClass() : string

获取当前Facade对应类名(或者已经绑定的容器对象标识)

Returns

string —

createFacade()

createFacade(bool  $newInstance = false) : object

创建Facade实例

Parameters

bool $newInstance

是否每次创建新的实例

Returns

object —