Permalink
Browse files

update abstract tag verbiage and example

git-svn-id: http://svn.php.net/repository/pear/packages/PhpDocumentor/trunk@291508 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent f8f5de2 commit f10db74c83e3c0053d6c2d46a4c442b8b267363c Chuck Burgess committed Nov 30, 2009
Showing with 25 additions and 9 deletions.
  1. +25 −9 tutorials/phpDocumentor/tags.abstract.pkg
@@ -1,14 +1,19 @@
<refentry id="{@id}">
<refnamediv>
<refname>@abstract</refname>
- <refpurpose>Document an abstract class, class variable or method</refpurpose>
+ <refpurpose>Document an abstract class or method</refpurpose>
</refnamediv>
<refsynopsisdiv>
<refsynopsisdivinfo>
<author>
Gregory Beaver
<authorblurb>Tag Documentation written by {@link mailto:cellog@php.net cellog@php.net}</authorblurb>
</author>
+ <author>
+ Chuck Burgess
+ <authorblurb>Edited by {@link mailto:ashnazg@php.net ashnazg@php.net}
+ </authorblurb>
+ </author>
<copyright>Copyright 2002, Gregory Beaver</copyright>
<releaseinfo>phpDocumentor 1.1+</releaseinfo>
</refsynopsisdivinfo>
@@ -18,7 +23,7 @@
</refsynopsisdiv>
<refsect1 id="{@id description}">
<title>Description</title>
- <para>Use the @abstract tag to declare a method, class variable, or class that must be re-defined in a child class to be valid.</para>
+ <para>Use the @abstract tag to declare a class as abstract, as well as for declaring what methods must be redefined in a child class.</para>
<warning>The @abstract tag is only valid in PHP 4, PHP 5 has a keyword abstract.</warning>
</refsect1>
<refsect1 id="{@id example}">
@@ -28,20 +33,31 @@
<programlisting role="php">
<![CDATA[
/**
- * example of basic @abstract usage in a class
- * Use this if every single element of the class is abstract
+ * example of @abstract usage in a class
+ *
+ * if even one method is declared abstract,
+ * then the class itself should be also
* @abstract
*/
-class myabstractclass
+class myAbstractClass
{
- function function1($baz)
+ /**
+ * this method is abstract...
+ * it has no body...
+ * @abstract
+ */
+ function function1($baz)
{
- ...
+ // no body
}
-
+
+ /**
+ * this method is not abstract
+ */
function function2()
{
- ...
+ // does something
+ ...
}
}
]]>

0 comments on commit f10db74

Please sign in to comment.