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

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | @cls
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{fmt/title|class <code>{{l/ver/class||ferret}}\{{l/ver/class|data}}\{{l/ver/class|data/card|card}}\cK1I</code>}}
{{page/ferret/class}}
{| style="border: solid 1px grey; background: #eef;"
{| style="border: solid 1px grey; background: #eef;"
|-
|-
| align=right |
| align=right |
{{l/ver/class|ns=data|caCard}}<br>
{{l/ver/class|ns=data/card|caBase}}<br>
{{l/ver/class|ns=uri|taForObject}}<br>
{{l/ver/class|ns=uri|taForObject}}<br>
{{l/ver/class|ns=data/evlog|tLoggableCard}}
{{l/ver/class|ns=data/evlog|tLoggableCard}}
Line 19: Line 19:
==Methods==
==Methods==
''current as of 2023-02-26''
''current as of 2023-02-26''
* INTERNAL SERVICES
===internal services===
** protected function KeyName() : string { return $this->Spec()->KeyName(); }
* protected function KeyName() : string { return $this->Spec()->KeyName(); }
* FIELDS: READ
===fields: read===
** public function KeyCell() : F\status\cVar
* public function KeyCell() : F\status\cVar
** public function KeyValue() : int
* public function KeyValue() : int
** public function KeyMatches(int $id) : bool
* public function KeyMatches(int $id) : bool
** protected function HasKey() : bool
* protected function HasKey() : bool
** protected function HasIdentity() : bool { return $this->HasKey(); }
* protected function HasIdentity() : bool { return $this->HasKey(); }
** public function IdentityValues() : array
* public function IdentityValues() : array
** protected function KeySlug() : string { return $this->KeyCell()->GetIt(); }
* protected function KeySlug() : string { return $this->KeyCell()->GetIt(); }
* FROM TRAIT, to be consolidated
===fields: calc===
** public function IsNew() : bool { return $this->KeyCell()->IsBlank(); }
* public function IsNew() : bool { return $this->KeyCell()->IsBlank(); }
** protected function GetSelfFilter() : string
* protected function GetSelfFilter() : string
** protected function {{l/ver/class/method|data/card/cK1I|DoUpdate}}(array $arChg) : FD\cUpdateStatus
===fields: write===
** public function {{l/ver/class/method|data/card/cK1I|WriteChanges}}() : FD\cUpdateStatus
* protected function {{l/ver/class/method|data/card/cK1I|DoUpdate|args=array $arChg}} : FD\cUpdateStatus
* public function {{l/ver/class/method|data/card/cK1I|WriteChanges}}() : FD\cUpdateStatus
 
==History==
==History==
* '''2023-02-26''' a bit of refactoring to try and fix some caching issues: changes to <code>{{l/sub|DoUpdate}}()</code>, <code>{{l/sub|WriteChanges}}()</code>
* '''2023-02-26''' a bit of refactoring to try and fix some caching issues: changes to <code>{{l/sub|DoUpdate}}()</code>, <code>{{l/sub|WriteChanges}}()</code>

Latest revision as of 18:48, 25 March 2023

class ferret\data\card\cK1I

caBase
taForObject
tLoggableCard

cK1I

cCalc

About

  • Purpose: data with a single int key
  • Assumes: int values do not need to be sanitized

Methods

current as of 2023-02-26

internal services

  • protected function KeyName() : string { return $this->Spec()->KeyName(); }

fields: read

  • public function KeyCell() : F\status\cVar
  • public function KeyValue() : int
  • public function KeyMatches(int $id) : bool
  • protected function HasKey() : bool
  • protected function HasIdentity() : bool { return $this->HasKey(); }
  • public function IdentityValues() : array
  • protected function KeySlug() : string { return $this->KeyCell()->GetIt(); }

fields: calc

  • public function IsNew() : bool { return $this->KeyCell()->IsBlank(); }
  • protected function GetSelfFilter() : string

fields: write

  • protected function DoUpdate(array $arChg) : FD\cUpdateStatus
  • public function WriteChanges() : FD\cUpdateStatus

History

  • 2023-02-26 a bit of refactoring to try and fix some caching issues: changes to DoUpdate(), WriteChanges()
  • 2022-03-27 consolidating tStorageK1I, which was being used for Storage Rows which really have no business operating on individual row data.
    • Replacements:
      • function KeyName(): use KeySlug()