penambahan phpdoc dan perubahan semua class mengacu hanya pada $app
This commit is contained in:
+17
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user