Ferreteria/v0.5/@cls/data/card/caBase: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
|}
|}
* '''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==
==Methods==
* protected function __construct(caPortRow $oRow, array $arVals)
* protected function __construct(caPortRow $oRow, array $arVals)

Revision as of 16:31, 19 March 2023

class ferret\data\caCard
cLocal caCard cK1I

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

  • 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).