diff options
author | Greg Beaver <cellog@php.net> | 2007-03-22 16:31:46 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2007-03-22 16:31:46 +0000 |
commit | 18cb2d59d4e3671604a5227c4a14913c946b0a61 (patch) | |
tree | acfb0995ab9dbf2f26e710393230eb0dac7bf70c | |
parent | a8d4058303778e92e6f8215237ed94d0d416be96 (diff) | |
download | php-git-18cb2d59d4e3671604a5227c4a14913c946b0a61.tar.gz |
rename begin/isFlushingToPhar/commit to startBuffering/isBuffering/stopBuffering
-rwxr-xr-x | ext/phar/phar_object.c | 20 | ||||
-rwxr-xr-x | ext/phar/tests/phar_begin_setstub_commit.phpt | 16 | ||||
-rw-r--r-- | ext/phar/tests/phar_commitwrite.phpt | 4 | ||||
-rwxr-xr-x | ext/phar/tests/phar_stub_error.phpt | 2 | ||||
-rwxr-xr-x | ext/phar/tests/phar_stub_write.phpt | 2 |
5 files changed, 22 insertions, 22 deletions
diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index bc8ce051f0..6dead35e4e 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -237,10 +237,10 @@ PHP_METHOD(Phar, getVersion) } /* }}} */ -/* {{{ proto void Phar::begin() +/* {{{ proto void Phar::startBuffering() * Do not flush a writeable phar (save its contents) until explicitly requested */ -PHP_METHOD(Phar, begin) +PHP_METHOD(Phar, startBuffering) { PHAR_ARCHIVE_OBJECT(); @@ -248,21 +248,21 @@ PHP_METHOD(Phar, begin) } /* }}} */ -/* {{{ proto bool Phar::isFlushingToPhar() +/* {{{ proto bool Phar::isBuffering() * Returns whether write operations are flushing to disk immediately */ -PHP_METHOD(Phar, isFlushingToPhar) +PHP_METHOD(Phar, isBuffering) { PHAR_ARCHIVE_OBJECT(); - RETURN_BOOL(phar_obj->arc.archive->donotflush); + RETURN_BOOL(!phar_obj->arc.archive->donotflush); } /* }}} */ -/* {{{ proto bool Phar::commit() +/* {{{ proto bool Phar::stopBuffering() * Save the contents of a modified phar */ -PHP_METHOD(Phar, commit) +PHP_METHOD(Phar, stopBuffering) { char *error; PHAR_ARCHIVE_OBJECT(); @@ -1152,8 +1152,8 @@ zend_function_entry php_archive_methods[] = { PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PRIVATE) #else PHP_ME(Phar, __construct, arginfo_phar___construct, ZEND_ACC_PUBLIC) - PHP_ME(Phar, begin, NULL, ZEND_ACC_PUBLIC) - PHP_ME(Phar, commit, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Phar, startBuffering, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Phar, stopBuffering, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, compressAllFilesGZ, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, compressAllFilesBZIP2, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, count, NULL, ZEND_ACC_PUBLIC) @@ -1162,7 +1162,7 @@ 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, isFlushingToPhar, NULL, ZEND_ACC_PUBLIC) + PHP_ME(Phar, isBuffering, NULL, ZEND_ACC_PUBLIC) PHP_ME(Phar, setMetadata, arginfo_entry_setMetadata, ZEND_ACC_PUBLIC) PHP_ME(Phar, setStub, arginfo_phar_setStub, ZEND_ACC_PUBLIC) PHP_ME(Phar, offsetExists, arginfo_phar_offsetExists, ZEND_ACC_PUBLIC) diff --git a/ext/phar/tests/phar_begin_setstub_commit.phpt b/ext/phar/tests/phar_begin_setstub_commit.phpt index 14d8081d86..2d26fa440f 100755 --- a/ext/phar/tests/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/phar_begin_setstub_commit.phpt @@ -1,5 +1,5 @@ --TEST-- -Phar::begin()/setStub()/commit() +Phar::startBuffering()/setStub()/stopBuffering() --SKIPIF-- <?php if (!extension_loaded("phar")) print "skip"; ?> --INI-- @@ -9,9 +9,9 @@ phar.readonly=0 <?php $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar'); //var_dump($p->getStub()); -var_dump($p->isFlushingToPhar()); -$p->begin(); -var_dump($p->isFlushingToPhar()); +var_dump($p->isBuffering()); +$p->startBuffering(); +var_dump($p->isBuffering()); $p['a.php'] = '<?php var_dump("Hello");'; $p->setStub('<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>'); include 'phar://brandnewphar.phar/a.php'; @@ -20,9 +20,9 @@ $p['b.php'] = '<?php var_dump("World");'; $p->setStub('<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>'); include 'phar://brandnewphar.phar/b.php'; var_dump($p->getStub()); -$p->commit(); +$p->stopBuffering(); echo "===COMMIT===\n"; -var_dump($p->isFlushingToPhar()); +var_dump($p->isBuffering()); include 'phar://brandnewphar.phar/a.php'; include 'phar://brandnewphar.phar/b.php'; var_dump($p->getStub()); @@ -33,14 +33,14 @@ var_dump($p->getStub()); unlink(dirname(__FILE__) . '/brandnewphar.phar'); ?> --EXPECT-- -bool(false) bool(true) +bool(false) string(5) "Hello" string(82) "<?php var_dump("First"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>" string(5) "World" string(83) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>" ===COMMIT=== -bool(false) +bool(true) string(5) "Hello" string(5) "World" string(83) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>" diff --git a/ext/phar/tests/phar_commitwrite.phpt b/ext/phar/tests/phar_commitwrite.phpt index 9e14e6067a..25d8c92966 100644 --- a/ext/phar/tests/phar_commitwrite.phpt +++ b/ext/phar/tests/phar_commitwrite.phpt @@ -1,5 +1,5 @@ --TEST-- -Phar::setStub()/commit() +Phar::setStub()/stopBuffering() --SKIPIF-- <?php if (!extension_loaded("phar")) print "skip"; ?> --INI-- @@ -9,7 +9,7 @@ phar.readonly=0 <?php $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar'); $p['file1.txt'] = 'hi'; -$p->commit(); +$p->stopBuffering(); var_dump($p->getStub()); $p->setStub("<?php function __autoload(\$class) diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt index e8a3811b5d..84dbbc6f3b 100755 --- a/ext/phar/tests/phar_stub_error.phpt +++ b/ext/phar/tests/phar_stub_error.phpt @@ -33,7 +33,7 @@ catch(exception $e) } var_dump($phar->getStub()); var_dump($phar->getStub() == $stub); -$phar->commit(); +$phar->stopBuffering(); var_dump($phar->getStub()); var_dump($phar->getStub() == $stub); diff --git a/ext/phar/tests/phar_stub_write.phpt b/ext/phar/tests/phar_stub_write.phpt index 56352564c8..e151b849a2 100755 --- a/ext/phar/tests/phar_stub_write.phpt +++ b/ext/phar/tests/phar_stub_write.phpt @@ -28,7 +28,7 @@ $stub = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; $phar->setStub($stub); var_dump($phar->getStub()); var_dump($phar->getStub() == $stub); -$phar->commit(); +$phar->stopBuffering(); var_dump($phar->getStub()); var_dump($phar->getStub() == $stub); |