enabling it on PHP_INI_ALL if it is disabled in the system, but does not
allow disabling it if it is enabled in the system [Greg]
X implement reading in metadata in manifest as [type32][len16][metadata...]
- where 0 type is
- used to finish metadata for this file [Greg]
+ where 0 type is used to finish metadata for this file [Greg]
* implement writing out of metadata to new manifest
X if SPL is disabled, enable only static methods of class Phar and disable
class PharFileInfo completley [Marcus]
have a handle opened for writing
* docs on file format/manifest description
* docs on uses
- * support stream context for specifying compression of a file, as well as
- meta-data, and copying of new prologue to the phar
+ * stream context for specifying compression of a file
+ * stream context for specifying meta-data
+ * stream context for specifying a new prologue to the phar
* add setUncompressed(), setCompressedGZ() and setCompressedBZ2() to
PharFileInfo class
* add uncompressAllFiles(), compressAllFilesGZ() and compressAllFilesBZ2()
* add getMetaData($key = null) to PharFileInfo
* always throw exceptions from the Phar object, and E_RECOVERABLE_ERROR from
streams interface
+ * ability to have Phar object return file class as offsetGet() result
Version 1.1.0
fname_len = spprintf(&fname, 0, "phar://%s/%s", phar_obj->arc.archive->fname, fname);
MAKE_STD_ZVAL(zfname);
ZVAL_STRINGL(zfname, fname, fname_len, 0);
- spl_instantiate_arg_ex1(phar_obj->spl.file_class, &return_value, 0, zfname TSRMLS_CC);
+ spl_instantiate_arg_ex1(phar_obj->spl.info_class, &return_value, 0, zfname TSRMLS_CC);
zval_ptr_dtor(&zfname);
}
{
echo $e->getMessage() . "\n";
}
-$phar->setFileClass('MyFile');
+$phar->setInfoClass('MyFile');
echo $phar['a.php']->getFilename() . "\n";
echo $phar['b/c.php']->getFilename() . "\n";
}
$phar = new Phar($fname);
-$phar->setFileClass('MyFile');
+$phar->setInfoClass('MyFile');
$f = $phar['a.php'];
require_once 'phar_oo_test.inc';
$phar = new Phar($fname);
-$phar->setFileClass('SplFileObject');
+$phar->setInfoClass('SplFileObject');
$f = $phar['a.csv'];
echo "===1===\n";
}
}
-$phar->setFileClass('MyCSVFile');
+$phar->setInfoClass('MyCSVFile');
$v = $phar['a.csv'];
echo "===3===\n";
}
}
-$phar->setFileClass('MyCSVFile2');
+$phar->setInfoClass('MyCSVFile2');
$v = $phar['a.csv'];
echo "===6===\n";
require_once 'phar_oo_test.inc';
$phar = new Phar($fname);
-$phar->setFileClass('SplFileObject');
+$phar->setInfoClass('SplFileObject');
$f = $phar['a.csv'];
$f->setFlags(SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE);
require_once 'phar_oo_test.inc';
$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
$phar['f.php'] = 'hi';
var_dump(isset($phar['f.php']));
require_once 'phar_oo_test.inc';
$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
$phar['f.php'] = 'hi';
var_dump(isset($phar['f.php']));
require_once 'phar_oo_test.inc';
$phar = new Phar($fname);
+$phar->setInfoClass('SplFileObject');
$phar['f.php'] = 'hi';
var_dump(isset($phar['f.php']));
require_once 'phar_oo_test.inc';
$phar = new Phar($fname);
+ $phar->setInfoClass('SplFileObject');
$phar['f.php'] = 'hi';
var_dump(isset($phar['f.php']));