cvs: phpdoc /scripts/docgen docgen.php version.tpl
| From: | Felipe Pena | Date: | Thu, 13 Nov 2008 02:43:33 +0000 |
| Subject: | cvs: phpdoc /scripts/docgen docgen.php version.tpl | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2511@lists.php.net to get a copy of this message | ||
felipe Thu Nov 13 02:43:33 2008 UTC
Added files:
/phpdoc/scripts/docgen version.tpl
Modified files:
/phpdoc/scripts/docgen docgen.php
Log:
- Added more a file to be generated (version.xml)
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/docgen/docgen.php?r1=1.3&r2=1.4&diff_format=u
Index: phpdoc/scripts/docgen/docgen.php
diff -u phpdoc/scripts/docgen/docgen.php:1.3 phpdoc/scripts/docgen/docgen.php:1.4
--- phpdoc/scripts/docgen/docgen.php:1.3 Wed Oct 1 17:34:28 2008
+++ phpdoc/scripts/docgen/docgen.php Thu Nov 13 02:43:33 2008
@@ -16,7 +16,7 @@
| Authors: Felipe Pena <felipe@php.net> |
+----------------------------------------------------------------------+
- $Id: docgen.php,v 1.3 2008/10/01 17:34:28 philip Exp $
+ $Id: docgen.php,v 1.4 2008/11/13 02:43:33 felipe Exp $
*/
if (!(extension_loaded('reflection') & extension_loaded('pcre'))) {
@@ -46,7 +46,8 @@
'configure.xml' => 'configure.tpl',
'examples.xml' => 'examples.tpl',
'reference.xml' => 'reference.tpl',
- 'ini.xml' => 'ini.tpl'
+ 'ini.xml' => 'ini.tpl',
+ 'version.xml' => 'version.tpl'
);
function usage() { /* {{{ */
@@ -534,6 +535,26 @@
$content = preg_replace('/\{CONSTANTS\}/', '&no.constants;', $content,
1);
}
break;
+
+ case 'version.xml':
+ $markup = "<!-- Functions -->\n";
+ /* Function list */
+ if ($functions = $obj->getFunctions()) {
+ foreach ($functions as $function) {
+ $markup .= " <function name='". strtolower($function->getName())
."' from='PHP 5 >= 5.2.0'/>\n";
+ }
+ }
+ $markup .= " <!-- Methods -->\n";
+ /* Method list */
+ if ($classes = $obj->getClasses()) {
+ foreach ($classes as $class) {
+ foreach ($class->getMethods() as $method) {
+ $markup .= " <function name='". strtolower($class->name .'::'.
$method->getName()) ."' from='PHP 5 >= 5.2.0'/>\n";
+ }
+ }
+ }
+ $content = preg_replace('/\{VERSIONS\}/', rtrim($markup), $content);
+ break;
}
return $content;
@@ -731,7 +752,7 @@
switch ($opt) {
case 'v':
case 'version':
- printf("%s\n", '$Revision: 1.3 $');
+ printf("%s\n", '$Revision: 1.4 $');
break;
case 'V':
case 'verbose':
http://cvs.php.net/viewvc.cgi/phpdoc/scripts/docgen/version.tpl?view=markup&rev=1.1
Index: phpdoc/scripts/docgen/version.tpl
+++ phpdoc/scripts/docgen/version.tpl
<?xml version='1.0' encoding='utf-8'?>
<!-- $Revision: 1.1 $ -->
<!--
Do NOT translate this file
-->
<versions>
{VERSIONS}
</versions>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->