[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] =?utf-8?q?svn:_/phpdoc/doc-base/trunk/scripts/docgen/_constructor.tpl_docgen.php?=
From:       Adam_Harvey <aharvey () php ! net>
Date:       2015-02-27 20:25:45
Message-ID: svn-aharvey-1425068745-336013-1134519698 () svn ! php ! net
[Download RAW message or body]

aharvey                                  Fri, 27 Feb 2015 20:25:45 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=336013

Log:
Add a constructor template, since they have a subtly different structure.

Changed paths:
    A + phpdoc/doc-base/trunk/scripts/docgen/constructor.tpl
        (from phpdoc/doc-base/trunk/scripts/docgen/method.tpl:r336010)
    U   phpdoc/doc-base/trunk/scripts/docgen/docgen.php

Copied: phpdoc/doc-base/trunk/scripts/docgen/constructor.tpl (from rev 336010, \
phpdoc/doc-base/trunk/scripts/docgen/method.tpl) \
                ===================================================================
--- phpdoc/doc-base/trunk/scripts/docgen/constructor.tpl	                        (rev \
                0)
+++ phpdoc/doc-base/trunk/scripts/docgen/constructor.tpl	2015-02-27 20:25:45 UTC (rev \
336013) @@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+{EMPTY_REVISION_KEYWORD}
+
+<refentry xml:id="{CLASS_NAME_ID}.{METHOD_NAME_ID}" \
xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + \
<refnamediv> +  <refname>{FULL_METHOD_NAME}</refname>
+  <refpurpose>Description</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+  &reftitle.description;
+  <constructorsynopsis>
+   {MODIFIERS}{RETURN_TYPE}<methodname>{FULL_METHOD_NAME}</methodname>
+   {METHOD_PARAMETERS}
+  </constructorsynopsis>
+  <para>
+
+  </para>
+
+  &warn.undocumented.func;
+
+ </refsect1>
+
+ <refsect1 role="parameters">
+  &reftitle.parameters;
+  {PARAMETERS_DESCRIPTION}
+ </refsect1>
+
+ <!-- Return values commented out, as constructors generally don't return a
+      value. Uncomment this if you do need a return values section (for
+      example, because there's also a procedural version of the method).
+ <refsect1 role="returnvalues">
+  &reftitle.returnvalues;
+  <para>
+
+  </para>
+ </refsect1>
+ -->
+
+{DEFAULT_EXAMPLE}
+{DEFAULT_SEEALSO}
+</refentry>
+
+<!-- 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:"~/.phpdoc/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
+-->

Modified: phpdoc/doc-base/trunk/scripts/docgen/docgen.php
===================================================================
--- phpdoc/doc-base/trunk/scripts/docgen/docgen.php	2015-02-27 20:20:06 UTC (rev \
                336012)
+++ phpdoc/doc-base/trunk/scripts/docgen/docgen.php	2015-02-27 20:25:45 UTC (rev \
336013) @@ -26,17 +26,19 @@

 /* Constants */
 define('DOC_METHOD', 	1<<0);
-define('DOC_PROPERTY', 	1<<1);
-define('DOC_CLASS', 	1<<2);
-define('DOC_EXTENSION',	1<<3);
-define('DOC_FUNCTION',	1<<4);
+define('DOC_CONSTRUCTOR', 1<<1);
+define('DOC_PROPERTY', 	1<<2);
+define('DOC_CLASS', 	1<<3);
+define('DOC_EXTENSION',	1<<4);
+define('DOC_FUNCTION',	1<<5);

 /* Templates */
 $TEMPLATE = array(
-	DOC_METHOD 	 => 'method.tpl',
-	DOC_PROPERTY => 'property.tpl',
-	DOC_CLASS 	 => 'class.tpl',
-	DOC_FUNCTION => 'function.tpl'
+	DOC_METHOD 	    => 'method.tpl',
+	DOC_CONSTRUCTOR => 'constructor.tpl',
+	DOC_PROPERTY    => 'property.tpl',
+	DOC_CLASS 	    => 'class.tpl',
+	DOC_FUNCTION    => 'function.tpl'
 );

 /* Default files for extensions */
@@ -782,6 +784,7 @@

 		/* Methods */
 		case DOC_METHOD:
+    case DOC_CONSTRUCTOR:
 			$path = $OPTION['output'] .'/'. strtolower($obj->class);
 			$filename = $path .'/'. format_filename($obj->name) .'.xml';

@@ -910,7 +913,7 @@
 				if ($method->getDeclaringClass()->name == $class->name &&
 					((is_array($OPTION['method']) && in_array(strtolower($method->getName()), \
$OPTION['method']))  || $OPTION['method'] == strtolower($method->getName()))) {
-					write_doc($method, DOC_METHOD);
+					write_doc($method, $method->isConstructor() ? DOC_CONSTRUCTOR : DOC_METHOD);
 				}
 			}
 		} catch (Exception $e) {
@@ -932,7 +935,7 @@
 			foreach ($class->getMethods() as $method) {
 				/* Don't get the inherited methods */
 				if ($method->getDeclaringClass()->name == $class->name) {
-					write_doc($method, DOC_METHOD);
+					write_doc($method, $method->isConstructor() ? DOC_CONSTRUCTOR : DOC_METHOD);
 				}
 			}
 		} catch (Exception $e) {



-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic