Previous Up Next
@example phpDocumentor tags @filesource

@final

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

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. }

Previous Up Next
@example phpDocumentor tags @filesource

Documentation generated on Mon, 05 Dec 2011 21:35:22 -0600 by phpDocumentor 1.4.4