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

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

Выше
@example phpDocumentor tags @filesource
    Поддержать сайт на родительском проекте КГБ