}
/* }}} */
-/* {{{ proto string PharFileInfo::getContents()
+/* {{{ proto string PharFileInfo::getContent()
* return the complete file contents of the entry (like file_get_contents)
*/
-PHP_METHOD(PharFileInfo, getContents)
+PHP_METHOD(PharFileInfo, getContent)
{
char *error;
php_stream *fp;
PHP_ME(PharFileInfo, __destruct, NULL, 0)
PHP_ME(PharFileInfo, chmod, arginfo_entry_chmod, 0)
PHP_ME(PharFileInfo, delMetadata, NULL, 0)
- PHP_ME(PharFileInfo, getContents, NULL, 0)
+ PHP_ME(PharFileInfo, getContent, NULL, 0)
PHP_ME(PharFileInfo, getCompressedSize, NULL, 0)
PHP_ME(PharFileInfo, getCRC32, NULL, 0)
PHP_ME(PharFileInfo, getMetadata, NULL, 0)
--TEST--
-Phar object: getContents()
+Phar object: getContent()
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
$phar = new Phar($fname);
$phar['a'] = 'file contents
this works';
-echo $phar['a']->getContents() . "\n";
+echo $phar['a']->getContent() . "\n";
?>
===DONE===
--CLEAN--
--TEST--
-Phar object: getContents() (verify it works with compression)
+Phar object: getContent() (verify it works with compression)
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded("spl")) die("skip SPL not available"); ?>
copy($fname, $fname2);
$phar2 = new Phar($fname2);
var_dump($phar2['a']->isCompressed());
-echo $phar2['a']->getContents() . "\n";
+echo $phar2['a']->getContent() . "\n";
?>
===DONE===
--CLEAN--