Class for creating archives in various formats - zip, tar.bz2, etc
/sprout/Controllers/Admin/HasCategoriesAdminController.php Highlighted file source
Line 62: * Do we have the 'archive' feature for categories?
Line 65: protected $category_archive = false;
Line 90: * Returns TRUE if category archive is enabled, FALSE otherwise
Line 92: public final function getCategoryArchive() {
Line 93: return $this->category_archive;
Line 137: if ($this->category_archive) {
Line 194: $view->category_archive = $this->category_archive;
Line 198: if ($this->category_archive) {
Line 199: $view->category_archive_type = $_GET['category_type'];
/sprout/Controllers/Admin/HasCategoriesAdminController.php Highlighted file source
Line 62: * Do we have the 'archive' feature for categories?
Line 65: protected $category_archive = false;
Line 90: * Returns TRUE if category archive is enabled, FALSE otherwise
Line 92: public final function getCategoryArchive() {
Line 93: return $this->category_archive;
Line 137: if ($this->category_archive) {
Line 194: $view->category_archive = $this->category_archive;
Line 198: if ($this->category_archive) {
Line 199: $view->category_archive_type = $_GET['category_type'];
/sprout/Controllers/DbToolsController.php Highlighted file source
Line 23: use ZipArchive;
Line 33: use Sprout\Helpers\Archive;
Line 771: if (class_exists('ZipArchive')) {
Line 772: echo '<p><em>Accepts raw SQL files, and zip archives.</em></p>';
Line 795: if (class_exists('ZipArchive')) {
Line 825: $za = new ZipArchive();
Line 872: $za = new ZipArchive();
Line 1120: echo '<p><input type="checkbox" name="compress" value="1" checked> Compress the file into a zip archive.</p>';
Line 1216: $export->buildArchive($name);
Line 1234: if (! class_exists('ZipArchive')) {
Line 1256: if (! class_exists('ZipArchive')) {
Line 1273: $za = new ZipArchive();
Line 1405: // Prep archive
Line 1406: $arch = new Archive('zip');
Line 1420: // Save archive
Line 1421: echo "<p>Saving archive.\n";
/sprout/Controllers/DbToolsController.php Highlighted file source
Line 23: use ZipArchive;
Line 33: use Sprout\Helpers\Archive;
Line 771: if (class_exists('ZipArchive')) {
Line 772: echo '<p><em>Accepts raw SQL files, and zip archives.</em></p>';
Line 795: if (class_exists('ZipArchive')) {
Line 825: $za = new ZipArchive();
Line 872: $za = new ZipArchive();
Line 1120: echo '<p><input type="checkbox" name="compress" value="1" checked> Compress the file into a zip archive.</p>';
Line 1216: $export->buildArchive($name);
Line 1234: if (! class_exists('ZipArchive')) {
Line 1256: if (! class_exists('ZipArchive')) {
Line 1273: $za = new ZipArchive();
Line 1405: // Prep archive
Line 1406: $arch = new Archive('zip');
Line 1420: // Save archive
Line 1421: echo "<p>Saving archive.\n";
/sprout/Helpers/Archive.php Highlighted file source
Line 20: use Sprout\Helpers\Drivers\ArchiveDriver;
Line 24: * Class for creating archives in various formats - zip, tar.bz2, etc
Line 26: class Archive
Line 36: * Loads the archive driver.
Line 39: * @param string type of archive to create
Line 47: $driver = 'Sprout\\Helpers\\Drivers\\Archive\\' . ucfirst($type);
Line 50: if (!class_exists($driver)) throw new \Exception('Unknown archive type: ' . $type);
Line 56: if ( ! ($this->driver instanceof ArchiveDriver))
Line 57: throw new Kohana_Exception('core.driver_implements', $type, get_class($this), 'ArchiveDriver');
Line 61: * Adds files or directories, recursively, to an archive.
Line 109: * Creates an archive and saves it into a file.
Line 112: * @param string archive filename
Line 121: throw new Kohana_Exception('archive.directory_unwritable', $directory);
Line 127: throw new Kohana_Exception('archive.filename_conflict', $filename);
Line 137: * Creates a raw archive file and returns it.
Line 146: } // End Archive
/sprout/Helpers/Drivers/Archive/Bzip.php Highlighted file source
Line 16: namespace Sprout\Helpers\Drivers\Archive;
Line 18: use Sprout\Helpers\Archive;
Line 19: use Sprout\Helpers\Drivers\ArchiveDriver;
Line 23: * Archive library bzip driver.
Line 25: class Bzip implements ArchiveDriver
Line 30: $archive = new Archive('tar');
Line 34: $archive->add($set[0], $set[1]);
Line 37: $gzfile = bzcompress($archive->create());
Line 73: } // End Archive_Bzip_Driver Class
/sprout/Helpers/Drivers/Archive/Bzip.php Highlighted file source
Line 16: namespace Sprout\Helpers\Drivers\Archive;
Line 18: use Sprout\Helpers\Archive;
Line 19: use Sprout\Helpers\Drivers\ArchiveDriver;
Line 23: * Archive library bzip driver.
Line 25: class Bzip implements ArchiveDriver
Line 30: $archive = new Archive('tar');
Line 34: $archive->add($set[0], $set[1]);
Line 37: $gzfile = bzcompress($archive->create());
Line 73: } // End Archive_Bzip_Driver Class
/sprout/Helpers/Drivers/Archive/Gzip.php Highlighted file source
Line 16: namespace Sprout\Helpers\Drivers\Archive;
Line 18: use Sprout\Helpers\Archive;
Line 19: use Sprout\Helpers\Drivers\ArchiveDriver;
Line 23: * Archive library gzip driver.
Line 25: class Gzip implements ArchiveDriver
Line 30: $archive = new Archive('tar');
Line 34: $archive->add($set[0], $set[1]);
Line 37: $gzfile = gzencode($archive->create());
Line 73: } // End Archive_Gzip_Driver Class
/sprout/Helpers/Drivers/Archive/Gzip.php Highlighted file source
Line 16: namespace Sprout\Helpers\Drivers\Archive;
Line 18: use Sprout\Helpers\Archive;
Line 19: use Sprout\Helpers\Drivers\ArchiveDriver;
Line 23: * Archive library gzip driver.
Line 25: class Gzip implements ArchiveDriver
Line 30: $archive = new Archive('tar');
Line 34: $archive->add($set[0], $set[1]);
Line 37: $gzfile = gzencode($archive->create());
Line 73: } // End Archive_Gzip_Driver Class
/sprout/views/admin/categories_navigation.php Highlighted file source
Line 59: <?php if ($category_archive and $cat['id']): ?>
Line 61: <li class="tree-list-settings-dropdown-list-item js--ajax-archive">
Line 62: <a href="admin/call/<?php echo $controller_name; ?>_category/ajaxArchiveAction/<?php echo $cat['id']; ?>">Archive Category</a>
Line 65: <li class="tree-list-settings-dropdown-list-item js--ajax-archive">
Line 66: <a href="admin/call/<?php echo $controller_name; ?>_category/ajaxUnarchiveAction/<?php echo $cat['id']; ?>">Unarchive Category</a>
Line 92: <?php if (isset($category_archive_type)): ?>
Line 93: <form class="sidebar-form category-archive-selection" method="get">
Line 94: <?php Fb::$data['category_type'] = $category_archive_type; ?>
Line 96: <?php echo Form::dropdown('category_type', ['-wrapper-class' => 'small white', 'placeholder' => 'Archive', 'title' => 'Select whether to show live categories, archived or everything.'], Constants::$category_admin_options); ?>
Line 100: $('.category-archive-selection select[name="category_type"]').change(function () {
/sprout/views/admin/categories_navigation.php Highlighted file source
Line 59: <?php if ($category_archive and $cat['id']): ?>
Line 61: <li class="tree-list-settings-dropdown-list-item js--ajax-archive">
Line 62: <a href="admin/call/<?php echo $controller_name; ?>_category/ajaxArchiveAction/<?php echo $cat['id']; ?>">Archive Category</a>
Line 65: <li class="tree-list-settings-dropdown-list-item js--ajax-archive">
Line 66: <a href="admin/call/<?php echo $controller_name; ?>_category/ajaxUnarchiveAction/<?php echo $cat['id']; ?>">Unarchive Category</a>
Line 92: <?php if (isset($category_archive_type)): ?>
Line 93: <form class="sidebar-form category-archive-selection" method="get">
Line 94: <?php Fb::$data['category_type'] = $category_archive_type; ?>
Line 96: <?php echo Form::dropdown('category_type', ['-wrapper-class' => 'small white', 'placeholder' => 'Archive', 'title' => 'Select whether to show live categories, archived or everything.'], Constants::$category_admin_options); ?>
Line 100: $('.category-archive-selection select[name="category_type"]').change(function () {
A total of 188 lines in 27 files were found