Ferreteria/v0.3/class/cFieldRow sourced: Difference between revisions
< Ferreteria | v0.3 | class
Jump to navigation
Jump to search
No edit summary |
m (10 revisions imported: moving this project here) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{page/code/class|ferreteria}} | {{page/code/class|ferreteria}} | ||
<source lang=php> | <source lang=php> | ||
abstract class cFieldRow_sourced extends cFieldRow { | abstract class cFieldRow_sourced extends cFieldRow { | ||
public function __construct(cIOSource $oSource) { | public function __construct(cIOSource $oSource) { $this->SetSourceObject($oSource); } | ||
protected function SetSourceObject(cIOSource $oSource) { | protected function SetSourceObject(cIOSource $oSource) { $this->oSource = $oSource; } | ||
public function GetSourceObject() : cIOSource { | // PUBLIC so PortalRow objects can access | ||
protected function GetDatabase() { | public function GetSourceObject() : cIOSource { return $this->oSource; } | ||
// SHORTCUT for convenience | |||
protected function GetDatabase() { return $this->GetSourceObject()->GetDatabase(); } | |||
// CEMENT: defer to Source object | // CEMENT: defer to Source object | ||
public function GetFieldClassArray() { | public function GetFieldClassArray() { return $this->GetSourceObject()->GetFieldClassArray(); } | ||
} | } | ||
</source> | </source> |
Latest revision as of 16:42, 22 May 2022
abstract class cFieldRow_sourced extends cFieldRow {
public function __construct(cIOSource $oSource) { $this->SetSourceObject($oSource); }
protected function SetSourceObject(cIOSource $oSource) { $this->oSource = $oSource; }
// PUBLIC so PortalRow objects can access
public function GetSourceObject() : cIOSource { return $this->oSource; }
// SHORTCUT for convenience
protected function GetDatabase() { return $this->GetSourceObject()->GetDatabase(); }
// CEMENT: defer to Source object
public function GetFieldClassArray() { return $this->GetSourceObject()->GetFieldClassArray(); }
}
- file: Template:L/ferreteria/file
- extends: Template:L/ferreteria/class
- extenders:
- (A) Template:L/ferreteria/class extends cFieldRow_sourced implements ifSingleKeyedRow
- Template:L/ferreteria/class extends ferreteria\data\cFieldRow_sourced