Ferreteria/v0.3/class/cFieldRow sourced: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.3‎ | class
Jump to navigation Jump to search
No edit summary
m (10 revisions imported: moving this project here)
 
(5 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 {
  HISTORY:
     public function __construct(cIOSource $oSource) { $this->SetSourceObject($oSource);    }
    2018-12-03 created to split off Source-related functionality, since cIORow_internal is explicitly not supposed to need one
     protected function SetSourceObject(cIOSource $oSource) { $this->oSource = $oSource; }
*/
    // PUBLIC so PortalRow objects can access
abstract class cIORow_sourced extends cIORow {
     public function GetSourceObject() : cIOSource { return $this->oSource; }
     public function __construct(cIOSource $oSource) {
    // SHORTCUT for convenience
     protected function SetSourceObject(cIOSource $oSource) {
     protected function GetDatabase() { return $this->GetSourceObject()->GetDatabase(); }
     public function GetSourceObject() : cIOSource {
     protected function GetDatabase() { // alias for GetSourceObject()->GetDatabase()
     // CEMENT: defer to Source object
     // CEMENT: defer to Source object
     public function GetFieldClassArray() {
     public function GetFieldClassArray() { return $this->GetSourceObject()->GetFieldClassArray(); }
}
}
</source>
</source>
* '''file''': {{l/ferreteria/file|data/rows/sourced.php}}
* '''file''': {{l/ferreteria/file|data/rows/sourced.php}}
* '''extends''': {{l/ferreteria/class|cIORow}}
* '''extends''': {{l/ferreteria/class|cFieldRow}}
* '''extenders''':
* '''extenders''':
** (A) '''{{l/ferreteria/class|cIORowStandard}}''' extends cIORow_sourced implements ifSingleKeyedRow
** (A) '''{{l/ferreteria/class|cFieldRowStandard}}''' extends cFieldRow_sourced implements ifSingleKeyedRow
** '''{{l/ferreteria/class|fcrDropInModule}}''' extends ferreteria\data\cIORow_sourced
** '''{{l/ferreteria/class|fcrDropInModule}}''' extends ferreteria\data\cFieldRow_sourced

Latest revision as of 16:42, 22 May 2022

Template:Page/code/class

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(); }
}