1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Facades for Yii 2 |
4
|
|
|
* |
5
|
|
|
* Generated on Yii 2.0.12 |
6
|
|
|
* |
7
|
|
|
* @see https://github.com/sergeymakinen/yii2-facades |
8
|
|
|
* @copyright Copyright (c) 2016-2017 Sergey Makinen (https://makinen.ru) |
9
|
|
|
* @license https://github.com/sergeymakinen/yii2-facades/blob/master/LICENSE The MIT License |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace sergeymakinen\facades; |
13
|
|
|
|
14
|
|
|
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */ |
15
|
|
|
/** |
16
|
|
|
* Yii::$app->get('redis') facade. |
17
|
|
|
* |
18
|
|
|
* Methods |
19
|
|
|
* |
20
|
|
|
* @method static \yii\base\Behavior attachBehavior(string $name, string|array|\yii\base\Behavior $behavior) Attaches a behavior to this component. |
21
|
|
|
* @see \yii\base\Component::attachBehavior |
22
|
|
|
* |
23
|
|
|
* @method static void attachBehaviors(array $behaviors) Attaches a list of behaviors to the component. |
24
|
|
|
* @see \yii\base\Component::attachBehaviors |
25
|
|
|
* |
26
|
|
|
* @method static array behaviors() Returns a list of behaviors that this component should behave as. |
27
|
|
|
* @see \yii\base\Component::behaviors |
28
|
|
|
* |
29
|
|
|
* @method static void close() Closes the currently active DB connection. |
30
|
|
|
* @see \yii\redis\Connection::close |
31
|
|
|
* |
32
|
|
|
* @method static null|\yii\base\Behavior detachBehavior(string $name) Detaches a behavior from the component. |
33
|
|
|
* @see \yii\base\Component::detachBehavior |
34
|
|
|
* |
35
|
|
|
* @method static void detachBehaviors() Detaches all behaviors from the component. |
36
|
|
|
* @see \yii\base\Component::detachBehaviors |
37
|
|
|
* |
38
|
|
|
* @method static void ensureBehaviors() Makes sure that the behaviors declared in [[behaviors()]] are attached to this component. |
39
|
|
|
* @see \yii\base\Component::ensureBehaviors |
40
|
|
|
* |
41
|
|
|
* @method static array|bool|null|string executeCommand(string $name, array $params = []) Executes a redis command. |
42
|
|
|
* @see \yii\redis\Connection::executeCommand |
43
|
|
|
* |
44
|
|
|
* @method static null|\yii\base\Behavior getBehavior(string $name) Returns the named behavior object. |
45
|
|
|
* @see \yii\base\Component::getBehavior |
46
|
|
|
* |
47
|
|
|
* @method static \yii\base\Behavior[] getBehaviors() Returns all behaviors attached to this component. |
48
|
|
|
* @see \yii\base\Component::getBehaviors |
49
|
|
|
* |
50
|
|
|
* @method static string getDriverName() Returns the name of the DB driver for the current [[dsn]]. |
51
|
|
|
* @see \yii\redis\Connection::getDriverName |
52
|
|
|
* |
53
|
|
|
* @method static bool getIsActive() Returns a value indicating whether the DB connection is established. |
54
|
|
|
* @see \yii\redis\Connection::getIsActive |
55
|
|
|
* |
56
|
|
|
* @method static \yii\redis\LuaScriptBuilder getLuaScriptBuilder() |
57
|
|
|
* @see \yii\redis\Connection::getLuaScriptBuilder |
58
|
|
|
* |
59
|
|
|
* @method static bool hasEventHandlers(string $name) Returns a value indicating whether there is any handler attached to the named event. |
60
|
|
|
* @see \yii\base\Component::hasEventHandlers |
61
|
|
|
* |
62
|
|
|
* @method static bool off(string $name, callable $handler = null) Detaches an existing event handler from this component. |
63
|
|
|
* @see \yii\base\Component::off |
64
|
|
|
* |
65
|
|
|
* @method static void on(string $name, callable $handler, mixed $data = null, bool $append = true) Attaches an event handler to an event. |
66
|
|
|
* @see \yii\base\Component::on |
67
|
|
|
* |
68
|
|
|
* @method static void open() Establishes a DB connection. |
69
|
|
|
* @see \yii\redis\Connection::open |
70
|
|
|
* |
71
|
|
|
* @method static void trigger(string $name, \yii\base\Event $event = null) Triggers an event. |
72
|
|
|
* @see \yii\base\Component::trigger |
73
|
|
|
* |
74
|
|
|
* Property accessors |
75
|
|
|
* |
76
|
|
|
* @method static float getConnectionTimeout() Returns timeout to use for connection to redis. |
77
|
|
|
* @see \yii\redis\Connection::connectionTimeout |
78
|
|
|
* |
79
|
|
|
* @method static float getDataTimeout() Returns timeout to use for redis socket when reading and writing data. |
80
|
|
|
* @see \yii\redis\Connection::dataTimeout |
81
|
|
|
* |
82
|
|
|
* @method static int getDatabase() Returns the redis database to use. |
83
|
|
|
* @see \yii\redis\Connection::database |
84
|
|
|
* |
85
|
|
|
* @method static string getHostname() Returns the hostname or ip address to use for connecting to the redis server. |
86
|
|
|
* @see \yii\redis\Connection::hostname |
87
|
|
|
* |
88
|
|
|
* @method static string getPassword() Returns the password for establishing DB connection. |
89
|
|
|
* @see \yii\redis\Connection::password |
90
|
|
|
* |
91
|
|
|
* @method static int getPort() Returns the port to use for connecting to the redis server. |
92
|
|
|
* @see \yii\redis\Connection::port |
93
|
|
|
* |
94
|
|
|
* @method static array getRedisCommands() Returns List of available redis commands. |
95
|
|
|
* @see \yii\redis\Connection::redisCommands |
96
|
|
|
* |
97
|
|
|
* @method static int getSocketClientFlags() Returns Bitmask field which may be set to any combination of connection flags passed to [stream_socket_client()](http://php.net/manual/en/function.stream-socket-client.php). |
98
|
|
|
* @see \yii\redis\Connection::socketClientFlags |
99
|
|
|
* |
100
|
|
|
* @method static string getUnixSocket() Returns the unix socket path (e.g. `/var/run/redis/redis.sock`) to use for connecting to the redis server. |
101
|
|
|
* @see \yii\redis\Connection::unixSocket |
102
|
|
|
* |
103
|
|
|
* @method static void setConnectionTimeout(float $value) Sets timeout to use for connection to redis. |
104
|
|
|
* @see \yii\redis\Connection::connectionTimeout |
105
|
|
|
* |
106
|
|
|
* @method static void setDataTimeout(float $value) Sets timeout to use for redis socket when reading and writing data. |
107
|
|
|
* @see \yii\redis\Connection::dataTimeout |
108
|
|
|
* |
109
|
|
|
* @method static void setDatabase(int $value) Sets the redis database to use. |
110
|
|
|
* @see \yii\redis\Connection::database |
111
|
|
|
* |
112
|
|
|
* @method static void setHostname(string $value) Sets the hostname or ip address to use for connecting to the redis server. |
113
|
|
|
* @see \yii\redis\Connection::hostname |
114
|
|
|
* |
115
|
|
|
* @method static void setPassword(string $value) Sets the password for establishing DB connection. |
116
|
|
|
* @see \yii\redis\Connection::password |
117
|
|
|
* |
118
|
|
|
* @method static void setPort(int $value) Sets the port to use for connecting to the redis server. |
119
|
|
|
* @see \yii\redis\Connection::port |
120
|
|
|
* |
121
|
|
|
* @method static void setRedisCommands(array $value) Sets List of available redis commands. |
122
|
|
|
* @see \yii\redis\Connection::redisCommands |
123
|
|
|
* |
124
|
|
|
* @method static void setSocketClientFlags(int $value) Sets Bitmask field which may be set to any combination of connection flags passed to [stream_socket_client()](http://php.net/manual/en/function.stream-socket-client.php). |
125
|
|
|
* @see \yii\redis\Connection::socketClientFlags |
126
|
|
|
* |
127
|
|
|
* @method static void setUnixSocket(string $value) Sets the unix socket path (e.g. `/var/run/redis/redis.sock`) to use for connecting to the redis server. |
128
|
|
|
* @see \yii\redis\Connection::unixSocket |
129
|
|
|
*/ |
130
|
|
|
class Redis extends Facade |
131
|
|
|
{ |
132
|
|
|
/** |
133
|
|
|
* @inheritDoc |
134
|
|
|
*/ |
135
|
1 |
|
public static function getFacadeComponentId() |
136
|
|
|
{ |
137
|
1 |
|
return 'redis'; |
138
|
|
|
} |
139
|
|
|
} |
140
|
|
|
|