home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / PHP / Beautifier / Batch / Output / DirectoryTar.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  2.3 KB  |  65 lines

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
  3. /**
  4. * Manage compression of many files to one compressed file (gz or bz2)
  5. *
  6. * PHP version 5
  7. *
  8. * LICENSE: This source file is subject to version 3.0 of the PHP license
  9. * that is available through the world-wide-web at the following URI:
  10. * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
  11. * the PHP License and are unable to obtain it through the web, please
  12. * send a note to license@php.net so we can mail you a copy immediately.
  13. * @category   PHP
  14. * @package PHP_Beautifier
  15. * @subpackage Batch
  16. * @author Claudio Bustos <cdx@users.sourceforge.com>
  17. * @copyright  2004-2006 Claudio Bustos
  18. * @link     http://pear.php.net/package/PHP_Beautifier
  19. * @link     http://beautifyphp.sourceforge.net
  20. * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  21. * @version    CVS: $Id:$
  22. */
  23. /**
  24. * Include Archive_Tar
  25. */
  26. include_once 'Archive/Tar.php';
  27. /**
  28. * PHP_Beautifier_Batch_FilesGz
  29. *
  30. * Manage compression of many files to one compressed file (gz or bz2)
  31. *
  32. * @category   PHP
  33. * @package PHP_Beautifier
  34. * @subpackage Batch
  35. * @author Claudio Bustos <cdx@users.sourceforge.com>
  36. * @copyright  2004-2006 Claudio Bustos
  37. * @link     http://pear.php.net/package/PHP_Beautifier
  38. * @link     http://beautifyphp.sourceforge.net
  39. * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
  40. * @version    Release: 0.1.14
  41. */
  42. abstract class PHP_Beautifier_Batch_Output_DirectoryTar extends PHP_Beautifier_Batch_Output {
  43.     public function save() 
  44.     {
  45.         $aInputFiles = $this->oBatch->getInputFiles();
  46.         $sOutputPath = $this->oBatch->getOutputPath();
  47.         $aOutputFiles = PHP_Beautifier_Common::getSavePath($aInputFiles, $sOutputPath);
  48.         for ($x = 0;$x<count($aInputFiles);$x++) {
  49.             unset($oTar);
  50.             $oTar = $this->getTar($aOutputFiles[$x]);
  51.             $this->beautifierSetInputFile($aInputFiles[$x]);
  52.             $this->beautifierProcess();
  53.             PHP_Beautifier_Common::createDir($aOutputFiles[$x]);
  54.             $oTar->addString(basename($aOutputFiles[$x]) , $this->beautifierGet());
  55.         }
  56.         return true;
  57.     }
  58.     /**
  59.     * @todo implements this
  60.     */
  61.     protected function getTar($sFileName) 
  62.     {
  63.     }
  64. }
  65. ?>