]> granicus.if.org Git - php/commitdiff
s/isFlushing/isFlushingToPhar much clearer purpose in method name
authorGreg Beaver <cellog@php.net>
Sat, 3 Feb 2007 00:45:24 +0000 (00:45 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 3 Feb 2007 00:45:24 +0000 (00:45 +0000)
ext/phar/phar_object.c
ext/phar/tests/phar_begin_setstub_commit.phpt

index 758b64c73f48ce78e356d19104ccf41c2bb4d9e5..6935055e0a104f062871adfc85a4f8f9010614fb 100755 (executable)
@@ -225,14 +225,14 @@ PHP_METHOD(Phar, begin)
 }
 /* }}} */
 
-/* {{{ proto bool Phar::isFlushing()
+/* {{{ proto bool Phar::isFlushingToPhar()
  * Returns whether write operations are flushing to disk immediately
  */
-PHP_METHOD(Phar, isFlushing)
+PHP_METHOD(Phar, isFlushingToPhar)
 {
        PHAR_ARCHIVE_OBJECT();
        
-       RETURN_BOOL(!phar_obj->arc.archive->donotflush);
+       RETURN_BOOL(phar_obj->arc.archive->donotflush);
 }
 /* }}} */
 
@@ -1105,7 +1105,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, isFlushing,            NULL,                      ZEND_ACC_PUBLIC)
+       PHP_ME(Phar, isFlushingToPhar,            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)
index ed9c12b6384d730738cce48431fbbb707bbbff94..e8537f989e20bd723f7e468ad24b36262b06e44b 100755 (executable)
@@ -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->isFlushing());
+var_dump($p->inTransaction());
 $p->begin();
-var_dump($p->isFlushing());
+var_dump($p->inTransaction());
 $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';
@@ -22,7 +22,7 @@ include 'phar://brandnewphar.phar/b.php';
 var_dump($p->getStub());
 $p->commit();
 echo "===COMMIT===\n";
-var_dump($p->isFlushing());
+var_dump($p->inTransaction());
 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(true)
 bool(false)
+bool(true)
 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(true)
+bool(false)
 string(5) "Hello"
 string(5) "World"
 string(83) "<?php var_dump("Second"); Phar::mapPhar("brandnewphar.phar"); __HALT_COMPILER(); ?>"