cvs: peardoc /en/pyrus/extending packagefile.xml
| From: | Greg Beaver | Date: | Thu, 09 Jul 2009 18:13:38 +0000 |
| Subject: | cvs: peardoc /en/pyrus/extending packagefile.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-11737@lists.php.net to get a copy of this message | ||
cellog Thu Jul 9 18:13:38 2009 UTC
Modified files:
/peardoc/en/pyrus/extending packagefile.xml
Log:
add section demonstrating iterating to retrieve post-install script files
http://cvs.php.net/viewvc.cgi/peardoc/en/pyrus/extending/packagefile.xml?r1=1.7&r2=1.8&diff_format=u
Index: peardoc/en/pyrus/extending/packagefile.xml
diff -u peardoc/en/pyrus/extending/packagefile.xml:1.7
peardoc/en/pyrus/extending/packagefile.xml:1.8
--- peardoc/en/pyrus/extending/packagefile.xml:1.7 Thu Jul 9 18:10:23 2009
+++ peardoc/en/pyrus/extending/packagefile.xml Thu Jul 9 18:13:38 2009
@@ -546,12 +546,18 @@
// $file->name == $file->packagedname
$relativepath = $file->name;
}
+
// *************** general purpose iteration ***************
foreach ($package->files as $relativepath => $infoarray) {
// $relativepath is the same as $file->name in the other examples
// $infoarray is the same array returned by the packagingcontents
// iterator
}
+
+// *************** retrieving post-install scripts ***************
+foreach ($package->scriptfiles as $file) {
+ // $file is the same object returned by the installcontents iterator
+}
?>
]]>
</programlisting>