Change name Webmodel to WebModel

This commit is contained in:
Antonio de la Rosa 2025-11-20 14:15:05 +01:00
parent a7267ffc30
commit 0164401e7e
22 changed files with 195 additions and 195 deletions

View file

@ -5,14 +5,14 @@ namespace PhangoApp\PhaModels;
/**
* A simple class for create where strings with checking.
*
* With this extension, you can create sql strings for use on where parameter of select method from Webmodel.
* With this extension, you can create sql strings for use on where parameter of select method from WebModel.
*
* Example ['AND']->array( 'field' => array('!=', 25), 'field2' => array('=', 'value_field'), 'field3' => array('LIKE', 'value_field'), 'field4' => array('IN', array('1','2','3'), 'limit_sql' => array('LIMIT', array(1, 10), 'order_by' => array('order_fieldY', 'ASC'
))
*
*You can join differents sql sentences
*
* @warning Phango developers recommend use Webmodel::check_where_sql method on a simple sql string
* @warning Phango developers recommend use WebModel::check_where_sql method on a simple sql string
*
*/
@ -59,7 +59,7 @@ class WhereSql {
list($field_select, $model_name, $field_name)=$this->set_safe_name_field(Webmodel::$model[$this->model_name], $field);
list($field_select, $model_name, $field_name)=$this->set_safe_name_field(WebModel::$model[$this->model_name], $field);
$op=$operation[0];
@ -70,7 +70,7 @@ class WhereSql {
case '=':
$value=Webmodel::$model[$model_name]->components[$field_name]->simple_check($value);
$value=WebModel::$model[$model_name]->components[$field_name]->simple_check($value);
$arr_to_glued[]=$field_select.' '.$op.' \''.$value.'\'';
@ -78,7 +78,7 @@ class WhereSql {
case '!=':
$value=Webmodel::$model[$model_name]->components[$field_name]->simple_check($value);
$value=WebModel::$model[$model_name]->components[$field_name]->simple_check($value);
$arr_to_glued[]=$field_select.' '.$op.' \''.$value.'\'';
@ -86,7 +86,7 @@ class WhereSql {
case 'LIKE':
$value=Webmodel::$model[$model_name]->components[$field_name]->simple_check($value);
$value=WebModel::$model[$model_name]->components[$field_name]->simple_check($value);
$arr_to_glued[]=$field_select.' '.$op.' \''.$value.'\'';
@ -98,7 +98,7 @@ class WhereSql {
foreach($value as $key_val => $val)
{
$value[$key_val]=Webmodel::$model[$model_name]->components[$field_name]->check($val);
$value[$key_val]=WebModel::$model[$model_name]->components[$field_name]->check($val);
}
@ -157,7 +157,7 @@ class WhereSql {
foreach($this->order_by as $arr_order)
{
list($field_select, $model_name, $field_name)=$this->set_safe_name_field(Webmodel::$model[$this->model_name], $arr_order['field']);
list($field_select, $model_name, $field_name)=$this->set_safe_name_field(WebModel::$model[$this->model_name], $arr_order['field']);
$arr_order_final[]=$field_name.' '.$arr_order['order'];