From 11c9ca2b19737bb4cc3ba388a95605c28c6c51e5 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 13 Jan 2012 11:42:48 +0000 Subject: [PATCH] MetaData is Metadata git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@322193 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/phar/Phar/getMetadata.xml | 12 ++++++------ reference/phar/Phar/startBuffering.xml | 2 +- reference/phar/PharFileInfo/getMetadata.xml | 12 ++++++------ reference/phar/PharFileInfo/setMetadata.xml | 10 +++++----- reference/phar/using.xml | 8 ++++---- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/reference/phar/Phar/getMetadata.xml b/reference/phar/Phar/getMetadata.xml index 03cec7173c..ed6014c38c 100644 --- a/reference/phar/Phar/getMetadata.xml +++ b/reference/phar/Phar/getMetadata.xml @@ -1,14 +1,14 @@ - + - Phar::getMetaData + Phar::getMetadata Returns phar archive meta-data &reftitle.description; - mixedPhar::getMetaData + mixedPhar::getMetadata @@ -35,7 +35,7 @@ &reftitle.examples; - A <function>Phar::getMetaData</function> example + A <function>Phar::getMetadata</function> example @@ -46,8 +46,8 @@ try { $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar'); $p['file.php'] = 'setMetaData(array('bootstrap' => 'file.php')); - var_dump($p->getMetaData()); + $p->setMetadata(array('bootstrap' => 'file.php')); + var_dump($p->getMetadata()); } catch (Exception $e) { echo 'Could not modify phar:', $e; } diff --git a/reference/phar/Phar/startBuffering.xml b/reference/phar/Phar/startBuffering.xml index 40ca35a93b..7867e014ea 100644 --- a/reference/phar/Phar/startBuffering.xml +++ b/reference/phar/Phar/startBuffering.xml @@ -66,7 +66,7 @@ $p['file.txt'] = 'hi'; $p['file2.txt'] = 'there'; $p['file2.txt']->setCompressedGZ(); $p['file3.txt'] = 'babyface'; -$p['file3.txt']->setMetaData(42); +$p['file3.txt']->setMetadata(42); $p->setStub(" - + - PharFileInfo::getMetaData + PharFileInfo::getMetadata Returns file-specific meta-data saved with a file &reftitle.description; - mixedPharFileInfo::getMetaData + mixedPharFileInfo::getMetadata @@ -34,7 +34,7 @@ &reftitle.examples; - A <function>PharFileInfo::getMetaData</function> example + A <function>PharFileInfo::getMetadata</function> example @@ -45,8 +45,8 @@ try { $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar'); $p['file.txt'] = 'hello'; - $p['file.txt']->setMetaData(array('user' => 'bill', 'mime-type' => 'text/plain')); - var_dump($p['file.txt']->getMetaData()); + $p['file.txt']->setMetadata(array('user' => 'bill', 'mime-type' => 'text/plain')); + var_dump($p['file.txt']->getMetadata()); } catch (Exception $e) { echo 'Could not create/modify brandnewphar.phar: ', $e; } diff --git a/reference/phar/PharFileInfo/setMetadata.xml b/reference/phar/PharFileInfo/setMetadata.xml index 38f85f3ad1..0422d363e9 100644 --- a/reference/phar/PharFileInfo/setMetadata.xml +++ b/reference/phar/PharFileInfo/setMetadata.xml @@ -2,18 +2,18 @@ - PharFileInfo::setMetaData + PharFileInfo::setMetadata Sets file-specific meta-data saved with a file &reftitle.description; - voidPharFileInfo::setMetaData + voidPharFileInfo::setMetadata mixedmetadata - PharFileInfo::setMetaData should only be used to store customized data in a file + PharFileInfo::setMetadata should only be used to store customized data in a file that cannot be represented with existing information stored with a file. Meta-data can significantly slow down the performance of loading a phar archive if the data is large, or if there are many files containing meta-data. @@ -61,7 +61,7 @@ &reftitle.examples; - A <function>PharFileInfo::setMetaData</function> example + A <function>PharFileInfo::setMetadata</function> example @@ -72,7 +72,7 @@ try { $p = new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar'); $p['file.txt'] = 'hello'; - $p['file.txt']->setMetaData(array('user' => 'bill', 'mime-type' => 'text/plain')); + $p['file.txt']->setMetadata(array('user' => 'bill', 'mime-type' => 'text/plain')); var_dump($p['file.txt']->getMetaData()); } catch (Exception $e) { echo 'Could not create/modify phar: ', $e; diff --git a/reference/phar/using.xml b/reference/phar/using.xml index eb61162408..e2ed3cdfdf 100644 --- a/reference/phar/using.xml +++ b/reference/phar/using.xml @@ -72,7 +72,7 @@ try { echo file_get_contents($file->getPathName()) . "\n"; // display contents; } if (isset($p['internal/file.php'])) { - var_dump($p['internal/file.php']->getMetaData()); + var_dump($p['internal/file.php']->getMetadata()); } // create a new phar - phar.readonly must be 0 in php.ini @@ -102,9 +102,9 @@ try { $p['images/wow.jpg'] = file_get_contents('images/wow.jpg'); // any value can be saved as file-specific meta-data - $p['images/wow.jpg']->setMetaData(array('mime-type' => 'image/jpeg')); + $p['images/wow.jpg']->setMetadata(array('mime-type' => 'image/jpeg')); $p['index.php'] = file_get_contents('index.php'); - $p->setMetaData(array('bootstrap' => 'index.php')); + $p->setMetadata(array('bootstrap' => 'index.php')); // save the phar archive to disk $p->stopBuffering(); @@ -344,7 +344,7 @@ $f = file_get_contents('phar://myphar.phar/whatever.txt'); In addition, the Phar object is the only way to access Phar-specific metadata, through - Phar::getMetaData, + Phar::getMetadata, and the only way to set or retrieve a Phar archive's PHP loader stub through Phar::getStub and Phar::setStub.