\think\facadeCookie

Summary

Methods
Properties
Constants
bind()
instance()
make()
__callStatic()
init()
has()
prefix()
get()
set()
forever()
delete()
clear()
No public properties found
No constants found
createFacade()
getFacadeClass()
$bind
$alwaysNewInstance
N/A
No private methods found
No private properties found
N/A

Properties

$bind

$bind : array

绑定对象

Type

array

$alwaysNewInstance

$alwaysNewInstance : bool

始终创建新的对象实例

Type

bool

Methods

bind()

bind(string|array  $name, string  $class = null) : object

绑定类的静态代理

Parameters

string|array $name

类标识

string $class

类名

Returns

object —

instance()

instance(mixed  ...$args) : mixed

带参数实例化当前Facade类

Parameters

mixed $args variadic

Returns

mixed —

make()

make(string  $class, array|true  $args = [], bool  $newInstance = false) : mixed

调用类的实例

Parameters

string $class

类名或者标识

array|true $args

变量

bool $newInstance

是否每次创建新的实例

Returns

mixed —

__callStatic()

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

Parameters

mixed $method
mixed $params

Returns

mixed —

init()

init(array  $config = []) : void

static 初始化

Parameters

array $config = []

has()

has(string  $name, string  $prefix = null) : bool

static 判断Cookie数据

Parameters

string $name
string $prefix = null

Returns

bool —

prefix()

prefix(string  $prefix = '') : mixed

static 设置或者获取cookie作用域(前缀)

Parameters

string $prefix = ''

Returns

mixed —

get()

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

static Cookie获取

Parameters

string $name
string $prefix = null

Returns

mixed —

set()

set(string  $name, mixed  $value = null, mixed  $option = null) : mixed

static 设置Cookie

Parameters

string $name
mixed $value = null
mixed $option = null

Returns

mixed —

forever()

forever(string  $name, mixed  $value = null, mixed  $option = null) : void

static 永久保存Cookie数据

Parameters

string $name
mixed $value = null
mixed $option = null

delete()

delete(string  $name, string  $prefix = null) : void

static Cookie删除

Parameters

string $name
string $prefix = null

clear()

clear(mixed  $prefix) : void

static Cookie清空

Parameters

mixed $prefix

createFacade()

createFacade(string  $class = '', array  $args = [], bool  $newInstance = false) : object

创建Facade实例

Parameters

string $class

类名或标识

array $args

变量

bool $newInstance

是否每次创建新的实例

Returns

object —

getFacadeClass()

getFacadeClass() : string

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

Returns

string —