From 2273af31045717f0ba3ddd073b09a11217960e42 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sun, 28 Jan 2007 19:09:12 +0000 Subject: [PATCH] beginWrite()/commitWrite() => begin()/commit(), note optional rollback() for 1.1 --- ext/phar/TODO | 3 ++- ext/phar/phar_object.c | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ext/phar/TODO b/ext/phar/TODO index baeba18288..1d4d849b1e 100644 --- a/ext/phar/TODO +++ b/ext/phar/TODO @@ -14,7 +14,7 @@ Version 1.0.0 * docs on uses X stream context for specifying compression of a file [Marcus] X stream context for specifying meta-data [Greg] - X Phar->begin()/Phar->commitWrite() for specifying a new stub to the phar, + X Phar->begin()/Phar->commit() for specifying a new stub to the phar, and deferring flush until all modifications are complete [Greg] X Phar->getStub() for retrieving the stub of the phar [Marcus] X add setUncompressed(), setCompressedGZ() and setCompressedBZ2() to @@ -29,4 +29,5 @@ Version 1.0.0 Version 1.1.0 * ability to have Phar object return file class as offsetGet() result + * [optional] Phar->rollback() to abort a write transaction * implement GPG signing diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 559e686765..63502cd1db 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -199,10 +199,10 @@ PHP_METHOD(Phar, getVersion) } /* }}} */ -/* {{{ proto void Phar::beginWrite() +/* {{{ proto void Phar::begin() * Do not flush a writeable phar (save its contents) until explicitly requested */ -PHP_METHOD(Phar, beginWrite) +PHP_METHOD(Phar, begin) { PHAR_ARCHIVE_OBJECT(); @@ -210,10 +210,10 @@ PHP_METHOD(Phar, beginWrite) } /* }}} */ -/* {{{ proto bool Phar::commitWrite([string|stream stub [, int len]]) +/* {{{ proto bool Phar::commit([string|stream stub [, int len]]) * Save the contents of a modified phar, with an optional change to the stub */ -PHP_METHOD(Phar, commitWrite) +PHP_METHOD(Phar, commit) { zval *stub = NULL; long len = -1; @@ -952,11 +952,11 @@ zend_function_entry php_archive_methods[] = { PHP_ME(Phar, getSignature, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, getStub, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, getVersion, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Phar, beginWrite, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Phar, begin, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, compressAllFilesGZ, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, compressAllFilesBZIP2, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, uncompressAllFiles, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Phar, commitWrite, arginfo_phar_setStub, ZEND_ACC_PUBLIC) + PHP_ME(Phar, commit, arginfo_phar_setStub, ZEND_ACC_PUBLIC) PHP_ME(Phar, offsetExists, arginfo_phar_offsetExists, ZEND_ACC_PUBLIC) PHP_ME(Phar, offsetGet, arginfo_phar_offsetExists, ZEND_ACC_PUBLIC) PHP_ME(Phar, offsetSet, arginfo_phar_offsetSet, ZEND_ACC_PUBLIC) -- 2.40.0