public function createRecord($tableName, array $recordData = [])
    {
        if (!$this->isNoneSystemTableNameAllowed($tableName)) {
            throw new \InvalidArgumentException('The table name "' . $tableName . '" is not allowed.', 1334438817);
        }
        if (isset($recordData['uid'])) {
            throw new \InvalidArgumentException('The column "uid" must not be set in $recordData.', 1334438963);
        }

        return $this->createRecordWithoutTableNameChecks($tableName, $recordData);
    }
public function createRecord($tableName, array $recordData = [])
    {
        if (!$this->isNoneSystemTableNameAllowed($tableName)) {
            throw new \InvalidArgumentException('The table name "' . $tableName . '" is not allowed.', 1334438817);
        }
        if (isset($recordData['uid'])) {
            throw new \InvalidArgumentException('The column "uid" must not be set in $recordData.', 1334438963);
        }

        return $this->createRecordWithoutTableNameChecks($tableName, $recordData);
    }
public function createRecord ( $ tableName , array $ recordData = [ ] ) { if ( ! $ this -> isNoneSystemTableNameAllowed ( $ tableName ) ) { throw new \ InvalidArgumentException ( 'The table name "' . $ tableName . '" is not allowed.' , 1334438817 ) ; } if ( isset ( $ recordData [ 'uid' ] ) ) { throw new \ InvalidArgumentException ( 'The column "uid" must not be set in $recordData.' , 1334438963 ) ; } return $ this -> createRecordWithoutTableNameChecks ( $ tableName , $ recordData ) ; }
Creates a new dummy record for unit tests.

If no record data for the new array is given, an empty record will be
created. It will only contain a valid UID and the "is_dummy_record" flag
will be set to 1.

Should there be any problem creating the record (wrong table name or a
problem with the database), 0 instead of a valid UID will be returned.

@param string $tableName
the name of the table on which the record should be created, must
not be empty
@param array $recordData
associative array that contains the data to save in the new
record, may be empty, but must not contain the key "uid"

@return int the UID of the new record, will be > 0

@throws \InvalidArgumentException
Creates a new dummy record for unit tests .