Skip to content

Commit

Permalink
update abstract tag verbiage and example
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/PhpDocumentor/trunk@291508 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
ashnazg committed Nov 30, 2009
1 parent f8f5de2 commit f10db74
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions tutorials/phpDocumentor/tags.abstract.pkg
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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}">
Expand All @@ -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
...
}
}
]]>
Expand Down

0 comments on commit f10db74

Please sign in to comment.