phpDocumentor
[ class tree: phpDocumentor ] [ index: phpDocumentor ] [ all elements ]
Prev Next

@final

Document a class method that should never be overridden in a child class

by Gregory Beaver
Tag Documentation written by cellog@php.net
Copyright 2002, Gregory Beaver
(phpDocumentor 1.2+)
@final

Description

Use the @final tag to declare a method that cannot be overridden in a child class.

The @final tag is only valid in PHP 4, PHP 5 has a keyword final.

Example

Here's an example:

  1. /**
  2.  * example of basic @final usage in a class
  3.  */
  4. class myclass
  5. {
  6.    /**
  7.     * function1 should never be overridden
  8.     * @final
  9.     */
  10.    function function1($baz)
  11.    {
  12.    ...
  13.    }
  14.    
  15.    function function2()
  16.    {
  17.    ...
  18.    }
  19. }

Prev Up Next
@example phpDocumentor tags @filesource

Documentation generated on Mon, 11 Mar 2019 15:50:05 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.