|
Phar->startBuffering
Start buffering Phar write operations, do not modify the Phar object on disk
()
Although technically unnecessary, the startBuffering() method can provide a significant performance boost when creating or modifying a Phar archive with a large number of files. Ordinarily, every time a file within a Phar archive is created or modified in any way, the entire Phar archive will be recreated with the changes. In this way, the archive will be up-to-date with the activity performed on it. However, this can be unnecessary when simply creating a new Phar archive, when it would make more sense to write the entire archive out at once. Similarly, it is often necessary to make a series of changes and to ensure that they all are possible before making any changes on disk, similar to the relational database concept of transactions. the startBuffering()/stopBuffering() pair of methods is provided for this purpose.
Phar write buffering is per-archive, buffering active for the
ExamplesExample 1814. A Phar->startBuffering() example<?php
See Also
|
Change LanguagePhar::apiVersion Phar::canCompress Phar::canWrite Phar->compressAllFilesBZIP2 Phar->compressAllFilesGZ Phar::__construct Phar->count Phar->getMetaData Phar->getModified Phar->getSignature Phar->getStub Phar->getVersion Phar->isBuffering Phar::loadPhar Phar::mapPhar Phar::offsetExists Phar::offsetGet Phar::offsetSet Phar::offsetUnset Phar->setMetaData Phar->setStub Phar->startBuffering Phar->stopBuffering Phar->uncompressAllFiles PharFileInfo->chmod PharFileInfo::__construct PharFileInfo->getCompressedSize PharFileInfo->getCRC32 PharFileInfo->getMetaData PharFileInfo->getPharFlags PharFileInfo->isCompressed PharFileInfo->isCompressedBZIP2 PharFileInfo->isCompressedGZ PharFileInfo->isCRCChecked PharFileInfo->setCompressedBZIP2 PharFileInfo->setCompressedGZ PharFileInfo->setMetaData PharFileInfo->setUncompressed |