Ferreteria/v2/class/fcTable keyed single

From Woozle Writes Code
< Ferreteria‎ | v2‎ | class
Revision as of 16:45, 22 May 2022 by Woozle (talk | contribs) (2 revisions imported: moving this project here)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Page/code/class

Functions

  • public function Insert_andGet(array $arData)

Code

abstract class fcTable_keyed_single extends fcTable_keyed {
    use ftSingleKeyedTable;
    
    public function Insert_andGet(array $arData) {
	$id = $this->Insert($arData);
	if ($id === FALSE) {
	    return NULL;
	} else {
	    return $this->GetRecord_forKey($id);
	}
    }
}