/**
* Take the data from the system and serialize it for the database.
*
* @param mixed $mixValues The data to serialize.
*
* @return string An serialized array with binary data or a binary data.
*/
public function serializeData($mixValues)
{
if ($mixValues === null) {
$mixValues = array('bin' => array(), 'value' => array(), 'path' => array());
}
$arrData = ToolboxFile::convertValuesToDatabase($mixValues);
// Check single file or multiple file.
if ($this->get('file_multiple')) {
$mixValues = serialize($arrData);
} else {
$mixValues = $arrData[0];
}
return $mixValues;
}