penambahan phpdoc dan perubahan semua class mengacu hanya pada $app

This commit is contained in:
2026-08-27 12:01:54 +07:00
parent 64e9c02c38
commit a2978ae927
17 changed files with 264 additions and 59 deletions
+17 -4
View File
@@ -3,7 +3,6 @@
/*******************************************************************
Module : /DB/SQL.php
Desc. : Class Query database
Created By : Siau Pheng ([email protected]).
Created Date : February 2nd, 2007.
Last Modified : August 21st, 2026.
@@ -21,6 +20,17 @@ use \flight\Session;
use \flight\database\SimplePdo;
use Webapp\Web\Param;
/**
* Class SQL
*
* Database CRUD dengan data dari GET/POST.
*
* @license MIT, https://www.3fonia.com
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
*
* @package Webapp\DB
*/
final class SQL {
private string $_ttable;
private array $_afield = [];
@@ -29,10 +39,13 @@ final class SQL {
protected SimplePdo $db;
protected array webuser;
public function __construct(Engine $app, Ssssion $session, SimplePdo $db){
/**
* @param Engine $app
*/
public function __construct(Engine $app){
$this->app = $app;
$this->db = $db;
$this->webuser = $session->get('__WEB_USER', ['UserID'=>0, 'UNIX'=>0]);
$this->db = $app->db();
$this->webuser = $app->session()->get('__WEB_USER', ['UserID'=>0, 'UNIX'=>0]);
}
//todo: deprecated