You are here

function RealisticDummyContentDummyEnvironment::_file_save_data_ in Realistic Dummy Content 7

Overrides RealisticDummyContentEnvironment::_file_save_data_

File

api/includes/RealisticDummyContentDummyEnvironment.inc, line 35
Define RealisticDummyContentLiveEnvironment autoload class.

Class

RealisticDummyContentDummyEnvironment
The dummy environment.

Code

function _file_save_data_($data, $destination = NULL) {
  if (!$destination) {
    throw new Exception('the dummy file system is not designed to use null destination');
  }
  $parsed = parse_url($destination);
  $return_array = array(
    'fid' => 1,
    'uri' => $destination,
    'filename' => $parsed['host'],
  );
  return (object) $return;
}