Welcome. I tested PHP wrappers for KendoUI. I found a problem / bug.
If you use AutoComplete control to retrieve data about the elements, such as a telephone, social security number, tax ID, ID, ID card number, barcode, etc are DataSourceResult-> Read () does not return any result.
The problem is the WHERE clause.
Should pay attention to excerpt:
At the time of transmission by the AutoComplete type information '90080800418 '(Social Security) is used in an incorrect set of operators.
The indicator provides information and an operator that has been used is startswith is not in the $operators.
I leave the matter to think about. It was enough to add operators to the $operators, but it is possible that you will want to develop something else.
If you use AutoComplete control to retrieve data about the elements, such as a telephone, social security number, tax ID, ID, ID card number, barcode, etc are DataSourceResult-> Read () does not return any result.
The problem is the WHERE clause.
private
function
where(
$properties
,
$filter
,
$all
) {
if
(isset(
$filter
->filters)) {
$logic
=
' AND '
;
if
(
$filter
->logic ==
'or'
) {
$logic
=
' OR '
;
}
$filters
=
$filter
->filters;
$where
=
array
();
for
(
$index
= 0;
$index
<
count
(
$filters
);
$index
++) {
$where
[] =
$this
->where(
$properties
,
$filters
[
$index
],
$all
);
}
$where
= implode(
$logic
,
$where
);
return
"($where)"
;
}
$field
=
$filter
->field;
if
(in_array(
$field
,
$properties
)) {
$index
=
array_search
(
$filter
,
$all
);
$value
=
":filter$index"
;
if
(
$this
->isDate(
$filter
->value)) {
$field
=
"date($field)"
;
$value
=
"date($value)"
;
}
if
(
$this
->isString(
$filter
->value)) {
$operator
=
$this
->stringOperators[
$filter
->operator];
}
else
{
$operator
=
$this
->operators[
$filter
->operator];
}
return
"$field $operator $value"
;
}
}
if
(
$this
->isString(
$filter
->value)) {
$operator
=
$this
->stringOperators[
$filter
->operator];
}
else
{
$operator
=
$this
->operators[
$filter
->operator];
}
private
$stringOperators
=
array
(
'eq'
=>
'LIKE'
,
'neq'
=>
'NOT LIKE'
,
'doesnotcontain'
=>
'NOT LIKE'
,
'contains'
=>
'LIKE'
,
'startswith'
=>
'LIKE'
,
'endswith'
=>
'LIKE'
);
private
$operators
=
array
(
'eq'
=>
'='
,
'gt'
=>
'>'
,
'gte'
=>
'>='
,
'lt'
=>
'<'
,
'lte'
=>
'<='
,
'neq'
=>
'!='
);
{"filter":{"logic":"and","filters":[{"value":"90080800418","operator":"startswith","field":"kh_Imie","ignoreCase":true}]}}