/** * * @param DBConnect $db * @param <type> $title * @param <type> $header * @param <type> $dataType * @param <type> $content */ public static final function _CreateDataObject( DBConnect &$db, $title, $header, $dataType, $content){ logger_FuncCall(__FILE__, __LINE__, __FUNCTION__); if (!is_string($title)){ throw new FCoreException("Invalid Param: Args[1] Not A String"); } if (!is_string($header)){ throw new FCoreException("Invalid Param: Args[2] Not A String"); } if (!is_string($dataType)){ throw new FCoreException("Invalid Param: Args[3] Not A String"); } if (!is_string($content)){ throw new FCoreException("Invalid Param: Args[4] Not A String"); } if ( $dataType != self::TEXT || $dataType != self::MTEXT || $dataType != self::BLOB || $dataType != self::MBLOB){ throw new FCoreException("Invalid Param Range: Unexpected DataType"); } $newID = $db->InsertThenReturnID(DATATYPEBASE, " dataType='$dataType', title='$title', timeMade=NOW(), header='$header'"); $db->Insert($dataType, DT_DTID."=$newID,". DT_CONTENT."='$content'"); return $newID; }