Пример #1
1
 public function index12Action()
 {
     echo "<h3 style='color:red;font-weight:bold'>" . __METHOD__ . "</h3>";
     $option = array("adapter" => "zip", "options" => array("target" => PUBLIC_PATH . "/unzip"));
     $input = PUBLIC_PATH . "/zip/compress.zip";
     $filter = new \Zend\Filter\Decompress($option);
     $filter->filter($input);
     return false;
 }
Пример #2
0
 /** Decompress */
 public function index12Action()
 {
     echo PUBLIC_PATH;
     $options = array('adapter' => 'zip', 'options' => array('target' => PUBLIC_PATH . '/tmp/unzip'));
     $filter = new \Zend\Filter\Decompress($options);
     $input = PUBLIC_PATH . '/tmp/compress.zip';
     $output = $filter->filter($input);
     return false;
 }
Пример #3
0
 protected static function localBuild()
 {
     // define framework cache dir. on user home directory
     $cacheHomeDir = getenv("HOME") . DS . '.phpalchemy' . DS . 'cache' . DS . 'composer' . DS;
     require_once 'Archive_Tar/Archive/Tar.php';
     \Alchemy\Console\Alchemist::createDir(getcwd() . '/vendor');
     $filter = new \Zend\Filter\Decompress(array('adapter' => 'Tar', 'options' => array('archive' => $cacheHomeDir . 'vendor.tar', 'target' => getcwd())));
     $compressed = $filter->filter($cacheHomeDir . 'vendor.tar');
     copy($cacheHomeDir . 'composer.phar', getcwd() . '/composer.phar');
     copy($cacheHomeDir . 'composer.lock', getcwd() . '/composer.lock');
 }