Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
231111da
Commit
231111da
authored
Oct 04, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guide WIP
parent
9d81395a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
runtime-logging.md
docs/guide/runtime-logging.md
+0
-0
Connection.php
extensions/redis/Connection.php
+4
-4
No files found.
docs/guide/runtime-logging.md
View file @
231111da
This diff is collapsed.
Click to expand it.
extensions/redis/Connection.php
View file @
231111da
...
@@ -247,7 +247,7 @@ class Connection extends Component
...
@@ -247,7 +247,7 @@ class Connection extends Component
return
;
return
;
}
}
$connection
=
$this
->
hostname
.
':'
.
$this
->
port
.
', database='
.
$this
->
database
;
$connection
=
$this
->
hostname
.
':'
.
$this
->
port
.
', database='
.
$this
->
database
;
\Yii
::
trace
(
'Opening redis DB connection: '
.
$connection
,
__
CLASS
__
);
\Yii
::
trace
(
'Opening redis DB connection: '
.
$connection
,
__
METHOD
__
);
$this
->
_socket
=
@
stream_socket_client
(
$this
->
_socket
=
@
stream_socket_client
(
'tcp://'
.
$this
->
hostname
.
':'
.
$this
->
port
,
'tcp://'
.
$this
->
hostname
.
':'
.
$this
->
port
,
$errorNumber
,
$errorNumber
,
...
@@ -278,7 +278,7 @@ class Connection extends Component
...
@@ -278,7 +278,7 @@ class Connection extends Component
{
{
if
(
$this
->
_socket
!==
null
)
{
if
(
$this
->
_socket
!==
null
)
{
$connection
=
$this
->
hostname
.
':'
.
$this
->
port
.
', database='
.
$this
->
database
;
$connection
=
$this
->
hostname
.
':'
.
$this
->
port
.
', database='
.
$this
->
database
;
\Yii
::
trace
(
'Closing DB connection: '
.
$connection
,
__
CLASS
__
);
\Yii
::
trace
(
'Closing DB connection: '
.
$connection
,
__
METHOD
__
);
$this
->
executeCommand
(
'QUIT'
);
$this
->
executeCommand
(
'QUIT'
);
stream_socket_shutdown
(
$this
->
_socket
,
STREAM_SHUT_RDWR
);
stream_socket_shutdown
(
$this
->
_socket
,
STREAM_SHUT_RDWR
);
$this
->
_socket
=
null
;
$this
->
_socket
=
null
;
...
@@ -334,7 +334,7 @@ class Connection extends Component
...
@@ -334,7 +334,7 @@ class Connection extends Component
*
*
* @param string $name the name of the command
* @param string $name the name of the command
* @param array $params list of parameters for the command
* @param array $params list of parameters for the command
* @return array|bool|null|string Dependen
d
on the executed command this method
* @return array|bool|null|string Dependen
t
on the executed command this method
* will return different data types:
* will return different data types:
*
*
* - `true` for commands that return "status reply".
* - `true` for commands that return "status reply".
...
@@ -357,7 +357,7 @@ class Connection extends Component
...
@@ -357,7 +357,7 @@ class Connection extends Component
$command
.=
'$'
.
mb_strlen
(
$arg
,
'8bit'
)
.
"
\r\n
"
.
$arg
.
"
\r\n
"
;
$command
.=
'$'
.
mb_strlen
(
$arg
,
'8bit'
)
.
"
\r\n
"
.
$arg
.
"
\r\n
"
;
}
}
\Yii
::
trace
(
"Executing Redis Command:
{
$name
}
"
,
__
CLASS
__
);
\Yii
::
trace
(
"Executing Redis Command:
{
$name
}
"
,
__
METHOD
__
);
fwrite
(
$this
->
_socket
,
$command
);
fwrite
(
$this
->
_socket
,
$command
);
return
$this
->
parseResponse
(
implode
(
' '
,
$params
));
return
$this
->
parseResponse
(
implode
(
' '
,
$params
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment