penambahan phpdoc dan perubahan semua class mengacu hanya pada $app
This commit is contained in:
+17
-4
@@ -3,7 +3,6 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /Web/Form.php
|
||||
Desc. : Form Generator (jQuery & Bootstrap)
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : February 27th, 2008.
|
||||
Last Modified : August 22nd, 2026.
|
||||
@@ -20,6 +19,17 @@ use \flight\Engine;
|
||||
use \flight\Session;
|
||||
use \flight\database\SimplePdo;
|
||||
|
||||
/**
|
||||
* Class Form
|
||||
*
|
||||
* Pembuatan form (jQuery & Bootstrap).
|
||||
*
|
||||
* @license MIT, https://www.3fonia.com
|
||||
* @copyright Copyright (c) 2008-2026, Siau Pheng <[email protected]>
|
||||
*
|
||||
* @package Webapp\Web
|
||||
*/
|
||||
|
||||
final class Form {
|
||||
private $__aform = [];
|
||||
private $__ahide = [];
|
||||
@@ -27,10 +37,13 @@ final class Form {
|
||||
protected SimplePdo $db;
|
||||
protected Session $session;
|
||||
|
||||
public function __construct(Engine $app, SimplePdo $db, Session $session){
|
||||
/**
|
||||
* @param Engine $app
|
||||
*/
|
||||
public function __construct(Engine $app){
|
||||
$this->app = $app;
|
||||
$this->db = $db;
|
||||
$this->session = $session;
|
||||
$this->db = $app->db();
|
||||
$this->session = $app->session();
|
||||
}
|
||||
|
||||
public function option(string $label, string $field, mixed $value=null, bool $enable=true, bool $req=false, array $arr=[], ?string $help=null, ?string $change=null, bool $multi=false, bool $group=false): string {
|
||||
|
||||
Reference in New Issue
Block a user