Difference between revisions of "Ferreteria/v0.3/class/cPortalRow storage"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Ferreteria‎ | v0.3‎ | class
Jump to navigation Jump to search
(extenders)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{page/code/class|ferreteria}}
+
{{page/code/class}}
 
<source lang=php>
 
<source lang=php>
 
class cPortalRow_storage extends cPortalRow implements ifLoadableRows {
 
class cPortalRow_storage extends cPortalRow implements ifLoadableRows {
Line 6: Line 6:
 
     protected function GetPortalType() {
 
     protected function GetPortalType() {
 
         return cIOField::ksPortalStorage;
 
         return cIOField::ksPortalStorage;
    }
 
    protected function SetPortals_fromFields(array $arFields) {
 
        if (count($arFields) == 0) {
 
            throw new \exception('Attempting to set Portals with an empty field-list.');
 
        } else {
 
            foreach ($arFields as $sKey => $oField) {
 
                $oPortal = $oField->MakePortal($this->GetPortalType());
 
                $this->arPortals[$sKey] = $oPortal;
 
            }
 
        }
 
 
     }
 
     }
 
}
 
}
Line 21: Line 11:
 
* '''file''': {{l/ferreteria/file|data/portals/rows/storage.php}}
 
* '''file''': {{l/ferreteria/file|data/portals/rows/storage.php}}
 
* '''extends''': {{l/ferreteria/class|cPortalRow}}
 
* '''extends''': {{l/ferreteria/class|cPortalRow}}
* '''implements''': {{l/ferreteria/class|ifLoadableRows}}
+
* '''implements''': {{l/ferreteria/class|ifRowsBlob}}
* '''uses''': {{l/ferreteria/class|tLoadableRow}}
+
* '''uses''': {{l/ferreteria/class|tRowsBlob}}
 
* '''extenders''': {{l/ferreteria/class|cPortalRow_database}}
 
* '''extenders''': {{l/ferreteria/class|cPortalRow_database}}

Latest revision as of 15:28, 3 February 2020

class cPortalRow_storage extends cPortalRow implements ifLoadableRows {
    use tLoadableRow;   // lets DB store its resource-blob

    protected function GetPortalType() {
        return cIOField::ksPortalStorage;
    }
}