$file->save($content = null, $format = null)

Saves new content to the file

  • $content (string)
  • $format (string)
    json or yaml (defaults to PHP serialization)
  • return (boolean)

This documentation entry is inherited from the Media class.

Example

$media->save(array(
    'foo' => 'bar',
    'bar' => 'foo'
), 'json');

$media->save('this is an arbitrary string');

Is something missing or incorrect? Edit this page on Github…