Ferreteria/v0.5/@cls/data/card/caBase: Difference between revisions
< Ferreteria | v0.5 | @cls
Jump to navigation
Jump to search
(Created page with "{{fmt/title|class <code>{{l/ver/class||ferret}}\{{l/ver/class|data}}\caCard</code>}} {| style="border: solid 1px grey; background: #eef;" |- | {{l/ver/class|ns=data|caCard}} → | {{l/ver/class|ns=data/card|cK1I}} |} * '''Source''': {{l/ferreteria/code|data/fields/card/card.php}}") |
No edit summary |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{page/ferret/class}} | ||
{| style="border: solid 1px grey; background: #eef;" | {| style="border: solid 1px grey; background: #eef;" | ||
|- | |- | ||
| {{l/ver/class|ns=data| | | {{l/ver/class|ns=arr|cLocal}} → | ||
| {{l/ver/class|ns=data/card|{{SUBPAGENAME}}}} → | |||
| {{l/ver/class|ns=data/card|cK1I}} | | {{l/ver/class|ns=data/card|cK1I}} | ||
|} | |} | ||
* '''Source''': {{l/ferreteria/code|data/fields/card/card.php}} | * '''Source''': {{l/ferreteria/code|data/fields/card/card.php}} | ||
* '''Purpose''': {{l/ver|PortCard}} base class | |||
==Methods== | |||
* protected function __construct(caPortRow $oRow, array $arVals) | |||
* protected function IsLocked() : bool { return FALSE; } | |||
* static public function MakeCard(FD\caPortRow $oRow, array $arVals) | |||
* protected function _LoadedVals(array $ar) { $this->arLoaded = $ar; } | |||
* protected function ChangedVals() : array | |||
* FRAMEWORK | |||
** protected function _Row(caPortRow $oRow) { $this->oRow = $oRow; } | |||
** protected function Row() : caPortRow { return $this->oRow; } | |||
** protected function Bank() : caPortBank { return $this->Row()->GetBank(); } | |||
** protected function Spec() : spec\cQuery | |||
** public function StorCard() : card\k1i\cStor | |||
* ERRORS | |||
** protected function MissingCellException(string $sName) : F\except\cInternal | |||
==History== | |||
{| class="wikitable sortable" | |||
|- | |||
! when || what | |||
|- | |||
| '''2022-03-10''' || changed cCard to descend from cRow instead of cArrayLocal | |||
|- | |||
| '''2022-03-23''' || Added ?etLoaded() for situations where we want to use a Card object to unambiguously indicate whether it has been loaded with data or not. The flag must be explicitly set by the function which wants to indicate status; it is not automatically set anywhere within this class. | |||
|- | |||
| '''2022-03-24''' || Removed ?etLoaded() again; see {Login Session Feature}->FindSession() history. | |||
|- | |||
| '''2022-05-20''' || | |||
Moved Spec functionality from here to k1i class because that's where we first need to know the key name. | |||
* Creating I/O Card classes elsewhere. Files reorganized. | |||
|- | |||
| '''2022-05-21''' || | |||
restoring earlier methodology because the immediate use-case for access to the Native Card was just the key value, and all of these classes are premised on the key being an integer -- which doesn't need translation. | |||
* Keeping the new subclasses, though, in case of future need to selectively enhance functionality. | |||
* Also keeping the Spec stuff confined to k1i at least for now. | |||
|- | |||
| '''2023-02-12''' || replacing GetBankBits() with functions just to directly store/retrieve the Bank object ...because why make it more complicated? | |||
|- | |||
| '''2023-02-17''' || | |||
...and why didn't I just have it construct with the appropriate PortRow, which itself points to the PortBank? I guess I'll find out, because I'm changing it to that now... | |||
* (Also reversing the order -- was value-array and *then* Bank object; now Row object and then value-array) | |||
|- | |||
| '''2023-02-19''' | |||
| | |||
* Changed caCard back to descending from F\arr\cLocal, because cRow doesn't do anything and the whole "data/row" folder is obsolete as far as I can tell. | |||
* Changed constructor to "protected", because we need to use static::MakeCard() now (in case of record-locking). | |||
|- | |||
| '''2023-02-19''' || Renamed from caCard to card\caBase | |||
|} |
Latest revision as of 18:55, 25 March 2023
cLocal → | caBase → | cK1I |
- Source: data/fields/card/card.php
- Purpose: PortCard base class
Methods
- protected function __construct(caPortRow $oRow, array $arVals)
- protected function IsLocked() : bool { return FALSE; }
- static public function MakeCard(FD\caPortRow $oRow, array $arVals)
- protected function _LoadedVals(array $ar) { $this->arLoaded = $ar; }
- protected function ChangedVals() : array
- FRAMEWORK
- protected function _Row(caPortRow $oRow) { $this->oRow = $oRow; }
- protected function Row() : caPortRow { return $this->oRow; }
- protected function Bank() : caPortBank { return $this->Row()->GetBank(); }
- protected function Spec() : spec\cQuery
- public function StorCard() : card\k1i\cStor
- ERRORS
- protected function MissingCellException(string $sName) : F\except\cInternal
History
when | what |
---|---|
2022-03-10 | changed cCard to descend from cRow instead of cArrayLocal |
2022-03-23 | Added ?etLoaded() for situations where we want to use a Card object to unambiguously indicate whether it has been loaded with data or not. The flag must be explicitly set by the function which wants to indicate status; it is not automatically set anywhere within this class. |
2022-03-24 | Removed ?etLoaded() again; see {Login Session Feature}->FindSession() history. |
2022-05-20 |
Moved Spec functionality from here to k1i class because that's where we first need to know the key name.
|
2022-05-21 |
restoring earlier methodology because the immediate use-case for access to the Native Card was just the key value, and all of these classes are premised on the key being an integer -- which doesn't need translation.
|
2023-02-12 | replacing GetBankBits() with functions just to directly store/retrieve the Bank object ...because why make it more complicated? |
2023-02-17 |
...and why didn't I just have it construct with the appropriate PortRow, which itself points to the PortBank? I guess I'll find out, because I'm changing it to that now...
|
2023-02-19 |
|
2023-02-19 | Renamed from caCard to card\caBase |