SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/Helpers/Drivers/ArchiveDriver.php

Copyright (C) 2017 Karmabunny Pty Ltd.

This file is a part of SproutCMS.

SproutCMS is free software: you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation, either
version 2 of the License, or (at your option) any later version.

For more information, visit <http://getsproutcms.com>.

This class was originally from Kohana 2.3.4
Copyright 2007-2008 Kohana Team
  1. <?php
  2. /**
  3.  * Copyright (C) 2017 Karmabunny Pty Ltd.
  4.  *
  5.  * This file is a part of SproutCMS.
  6.  *
  7.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  8.  * of the GNU General Public License as published by the Free Software Foundation, either
  9.  * version 2 of the License, or (at your option) any later version.
  10.  *
  11.  * For more information, visit <http://getsproutcms.com>.
  12.  *
  13.  * This class was originally from Kohana 2.3.4
  14.  * Copyright 2007-2008 Kohana Team
  15.  */
  16. namespace Sprout\Helpers\Drivers;
  17.  
  18.  
  19. /**
  20.  * Archive driver interface.
  21.  */
  22. interface ArchiveDriver {
  23.  
  24. /**
  25.   * Creates an archive and optionally, saves it to a file.
  26.   *
  27.   * @param array filenames to add
  28.   * @param string file to save the archive to
  29.   * @return boolean
  30.   */
  31. public function create($paths, $filename = FALSE);
  32.  
  33. /**
  34.   * Add data to the archive.
  35.   *
  36.   * @param string filename
  37.   * @param string name of file in archive
  38.   * @return void
  39.   */
  40. public function addData($file, $name, $contents = NULL);
  41.  
  42. } // End ArchiveDriver Interface
  43.