Changeset 8 for trunk/Packages/Common/Table.php
- Timestamp:
- Jun 1, 2023, 12:18:18 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Table.php
r7 r8 3 3 class Control 4 4 { 5 var$Name;5 public string $Name; 6 6 7 function Show() 7 function Show(): string 8 8 { 9 9 return ''; … … 13 13 class Table 14 14 { 15 function GetCell($Y, $X) 15 function GetCell($Y, $X): string 16 16 { 17 17 return ''; … … 26 26 } 27 27 28 function RowsCount() 28 function RowsCount(): int 29 29 { 30 30 return 0; … … 34 34 class TableMemory extends Table 35 35 { 36 var$Cells;36 public array $Cells; 37 37 38 function GetCell($Y, $X) 38 function GetCell($Y, $X): string 39 39 { 40 40 return $this->Cells[$Y][$X]; 41 41 } 42 42 43 function RowsCount() 43 function RowsCount(): int 44 44 { 45 45 return count($this->Cells); … … 49 49 class TableSQL extends Table 50 50 { 51 var$Query;52 var$Database;53 var$Cells;51 public string $Query; 52 public Database $Database; 53 public array $Cells; 54 54 55 function GetCell($Y, $X) 55 function GetCell($Y, $X): string 56 56 { 57 57 return $this->Cells[$Y][$X]; … … 73 73 } 74 74 75 function RowsCount() 75 function RowsCount(): int 76 76 { 77 77 return count($this->Cells); … … 81 81 class TableColumn 82 82 { 83 var$Name;84 var$Title;83 public string $Name; 84 public string $Title; 85 85 } 86 86 87 87 class VisualTable extends Control 88 88 { 89 var $Cells; 90 var $Columns; 91 var $OrderSQL; 92 var $OrderColumn; 93 var $OrderDirection; 94 var $OrderArrowImage; 95 var $DefaultColumn; 96 var $DefaultOrder; 97 var $Table; 98 var $Style; 89 public array $Cells; 90 public array $Columns; 91 public string $OrderSQL; 92 public string $OrderColumn; 93 public int $OrderDirection; 94 public array $OrderArrowImage; 95 public string $DefaultColumn; 96 public int $DefaultOrder; 97 public TableMemory $Table; 98 public string $Style; 99 private array $OrderDirSQL; 99 100 100 function __construct( Application $System)101 function __construct() 101 102 { 103 global $System; 104 102 105 $this->Columns = array(); 103 106 $this->Table = new TableMemory(); … … 124 127 } 125 128 126 function Show() 129 function Show(): string 127 130 { 128 131 $Output = '<table class="'.$this->Style.'">'; … … 146 149 } 147 150 148 function GetOrderHeader() 151 function GetOrderHeader(): string 149 152 { 150 153 if (array_key_exists('OrderCol', $_GET)) $_SESSION['OrderCol'] = $_GET['OrderCol'];
Note:
See TracChangeset
for help on using the changeset viewer.