silverstripe-framework/filesystem/Archive.php
Sam Minnee d27937f448 Updated API documentation package tags
Fixed some whitespace

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47725 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-01-08 06:37:50 +00:00

31 lines
742 B
PHP

<?php
/**
* @package sapphire
* @subpackage filesystem
*/
/**
* Class for handling archives.
* To implement a specific archive system, create a subclass of this abstract class, and amend the implementation of Archive::open().
*/
abstract class Archive extends Object {
/**
* Return an Archive object for the given file.
*/
static function open($filename) {
if(substr($filename, strlen($filename) - strlen('.tar.gz')) == '.tar.gz' ||
substr($filename, strlen($filename) - strlen('.tar.bz2')) == '.tar.bz2' ||
substr($filename, strlen($filename) - strlen('.tar')) == '.tar') {
return new TarballArchive($filename);
}
}
function extractTo($destination, $entries = null) {
}
function listing($path) {
}
}
?>