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
73442fb1
Commit
73442fb1
authored
Nov 30, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc fix.
parent
5883e0f3
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
75 deletions
+9
-75
Connection.php
extensions/elasticsearch/Connection.php
+3
-0
QueryBuilder.php
extensions/elasticsearch/QueryBuilder.php
+1
-53
Connection.php
extensions/sphinx/Connection.php
+0
-3
Application.php
framework/yii/base/Application.php
+1
-0
Widget.php
framework/yii/base/Widget.php
+2
-1
ActiveRecord.php
framework/yii/db/ActiveRecord.php
+0
-13
EmailTarget.php
framework/yii/log/EmailTarget.php
+2
-3
BaseMessage.php
framework/yii/mail/BaseMessage.php
+0
-2
No files found.
extensions/elasticsearch/Connection.php
View file @
73442fb1
...
@@ -15,6 +15,9 @@ use yii\helpers\Json;
...
@@ -15,6 +15,9 @@ use yii\helpers\Json;
/**
/**
* elasticsearch Connection is used to connect to an elasticsearch cluster version 0.20 or higher
* elasticsearch Connection is used to connect to an elasticsearch cluster version 0.20 or higher
*
*
* @property string $driverName Name of the DB driver. This property is read-only.
* @property boolean $isActive Whether the DB connection is established. This property is read-only.
*
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
*/
*/
...
...
extensions/elasticsearch/QueryBuilder.php
View file @
73442fb1
...
@@ -14,7 +14,6 @@ use yii\helpers\Json;
...
@@ -14,7 +14,6 @@ use yii\helpers\Json;
/**
/**
* QueryBuilder builds an elasticsearch query based on the specification given as a [[Query]] object.
* QueryBuilder builds an elasticsearch query based on the specification given as a [[Query]] object.
*
*
*
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
*/
*/
...
@@ -247,7 +246,7 @@ class QueryBuilder extends \yii\base\Object
...
@@ -247,7 +246,7 @@ class QueryBuilder extends \yii\base\Object
}
}
if
(
count
(
$column
)
>
1
)
{
if
(
count
(
$column
)
>
1
)
{
return
$this
->
buildCompositeInCondition
(
$operator
,
$column
,
$values
,
$params
);
return
$this
->
buildCompositeInCondition
(
$operator
,
$column
,
$values
);
}
elseif
(
is_array
(
$column
))
{
}
elseif
(
is_array
(
$column
))
{
$column
=
reset
(
$column
);
$column
=
reset
(
$column
);
}
}
...
@@ -289,61 +288,10 @@ class QueryBuilder extends \yii\base\Object
...
@@ -289,61 +288,10 @@ class QueryBuilder extends \yii\base\Object
protected
function
buildCompositeInCondition
(
$operator
,
$columns
,
$values
)
protected
function
buildCompositeInCondition
(
$operator
,
$columns
,
$values
)
{
{
throw
new
NotSupportedException
(
'composite in is not supported by elasticsearch.'
);
throw
new
NotSupportedException
(
'composite in is not supported by elasticsearch.'
);
$vss
=
array
();
foreach
(
$values
as
$value
)
{
$vs
=
array
();
foreach
(
$columns
as
$column
)
{
if
(
isset
(
$value
[
$column
]))
{
$phName
=
self
::
PARAM_PREFIX
.
count
(
$params
);
$params
[
$phName
]
=
$value
[
$column
];
$vs
[]
=
$phName
;
}
else
{
$vs
[]
=
'NULL'
;
}
}
$vss
[]
=
'('
.
implode
(
', '
,
$vs
)
.
')'
;
}
foreach
(
$columns
as
$i
=>
$column
)
{
if
(
strpos
(
$column
,
'('
)
===
false
)
{
$columns
[
$i
]
=
$this
->
db
->
quoteColumnName
(
$column
);
}
}
return
'('
.
implode
(
', '
,
$columns
)
.
")
$operator
("
.
implode
(
', '
,
$vss
)
.
')'
;
}
}
private
function
buildLikeCondition
(
$operator
,
$operands
)
private
function
buildLikeCondition
(
$operator
,
$operands
)
{
{
throw
new
NotSupportedException
(
'like conditions is not supported by elasticsearch.'
);
throw
new
NotSupportedException
(
'like conditions is not supported by elasticsearch.'
);
if
(
!
isset
(
$operands
[
0
],
$operands
[
1
]))
{
throw
new
Exception
(
"Operator '
$operator
' requires two operands."
);
}
list
(
$column
,
$values
)
=
$operands
;
$values
=
(
array
)
$values
;
if
(
empty
(
$values
))
{
return
$operator
===
'LIKE'
||
$operator
===
'OR LIKE'
?
'0==1'
:
''
;
}
if
(
$operator
===
'LIKE'
||
$operator
===
'NOT LIKE'
)
{
$andor
=
' AND '
;
}
else
{
$andor
=
' OR '
;
$operator
=
$operator
===
'OR LIKE'
?
'LIKE'
:
'NOT LIKE'
;
}
if
(
strpos
(
$column
,
'('
)
===
false
)
{
$column
=
$this
->
db
->
quoteColumnName
(
$column
);
}
$parts
=
array
();
foreach
(
$values
as
$value
)
{
$phName
=
self
::
PARAM_PREFIX
.
count
(
$params
);
$params
[
$phName
]
=
$value
;
$parts
[]
=
"
$column
$operator
$phName
"
;
}
return
implode
(
$andor
,
$parts
);
}
}
}
}
extensions/sphinx/Connection.php
View file @
73442fb1
...
@@ -52,9 +52,6 @@ use yii\base\NotSupportedException;
...
@@ -52,9 +52,6 @@ use yii\base\NotSupportedException;
*
*
* @property string $lastInsertID The row ID of the last row inserted, or the last value retrieved from the
* @property string $lastInsertID The row ID of the last row inserted, or the last value retrieved from the
* sequence object. This property is read-only.
* sequence object. This property is read-only.
* @property Schema $schema The schema information for this Sphinx connection. This property is read-only.
* @property \yii\sphinx\QueryBuilder $queryBuilder The query builder for this Sphinx connection. This property is
* read-only.
*
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
* @since 2.0
...
...
framework/yii/base/Application.php
View file @
73442fb1
...
@@ -23,6 +23,7 @@ use yii\web\HttpException;
...
@@ -23,6 +23,7 @@ use yii\web\HttpException;
* @property \yii\base\Formatter $formatter The formatter application component. This property is read-only.
* @property \yii\base\Formatter $formatter The formatter application component. This property is read-only.
* @property \yii\i18n\I18N $i18n The internationalization component. This property is read-only.
* @property \yii\i18n\I18N $i18n The internationalization component. This property is read-only.
* @property \yii\log\Logger $log The log component. This property is read-only.
* @property \yii\log\Logger $log The log component. This property is read-only.
* @property \yii\mail\MailerInterface $mail The mailer interface. This property is read-only.
* @property \yii\web\Request|\yii\console\Request $request The request component. This property is read-only.
* @property \yii\web\Request|\yii\console\Request $request The request component. This property is read-only.
* @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime"
* @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime"
* subdirectory under [[basePath]].
* subdirectory under [[basePath]].
...
...
framework/yii/base/Widget.php
View file @
73442fb1
...
@@ -14,7 +14,8 @@ use ReflectionClass;
...
@@ -14,7 +14,8 @@ use ReflectionClass;
* Widget is the base class for widgets.
* Widget is the base class for widgets.
*
*
* @property string $id ID of the widget.
* @property string $id ID of the widget.
* @property View $view The view object that can be used to render views or view files.
* @property \yii\web\View $view The view object that can be used to render views or view files. Note that the
* type of this property differs in getter and setter. See [[getView()]] and [[setView()]] for details.
* @property string $viewPath The directory containing the view files for this widget. This property is
* @property string $viewPath The directory containing the view files for this widget. This property is
* read-only.
* read-only.
*
*
...
...
framework/yii/db/ActiveRecord.php
View file @
73442fb1
...
@@ -22,19 +22,6 @@ use yii\helpers\Inflector;
...
@@ -22,19 +22,6 @@ use yii\helpers\Inflector;
*
*
* @include @yii/db/ActiveRecord.md
* @include @yii/db/ActiveRecord.md
*
*
* @property array $dirtyAttributes The changed attribute values (name-value pairs). This property is
* read-only.
* @property boolean $isNewRecord Whether the record is new and should be inserted when calling [[save()]].
* @property array $oldAttributes The old attribute values (name-value pairs).
* @property mixed $oldPrimaryKey The old primary key value. An array (column name => column value) is
* returned if the primary key is composite. A string is returned otherwise (null will be returned if the key
* value is null). This property is read-only.
* @property array $populatedRelations An array of relation data indexed by relation names. This property is
* read-only.
* @property mixed $primaryKey The primary key value. An array (column name => column value) is returned if
* the primary key is composite. A string is returned otherwise (null will be returned if the key value is null).
* This property is read-only.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
...
...
framework/yii/log/EmailTarget.php
View file @
73442fb1
...
@@ -14,9 +14,8 @@ use yii\mail\MailerInterface;
...
@@ -14,9 +14,8 @@ use yii\mail\MailerInterface;
/**
/**
* EmailTarget sends selected log messages to the specified email addresses.
* EmailTarget sends selected log messages to the specified email addresses.
*
*
* The target email addresses may be specified via [[emails]] property.
* You may configure the email to be sent by setting the [[message]] property, through which
* Optionally, you may set the email [[subject]], [[sentFrom]] address and
* you can set the target email addresses, subject, etc.
* additional [[headers]].
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
* @since 2.0
...
...
framework/yii/mail/BaseMessage.php
View file @
73442fb1
...
@@ -18,8 +18,6 @@ use Yii;
...
@@ -18,8 +18,6 @@ use Yii;
*
*
* @see BaseMailer
* @see BaseMailer
*
*
* @property MailerInterface $mailer The mailer component. This property is read-only.
*
* @author Paul Klimov <klimov.paul@gmail.com>
* @author Paul Klimov <klimov.paul@gmail.com>
* @since 2.0
* @since 2.0
*/
*/
...
...
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