@static
@static
Document a static class or method
by Gregory Beaver
Copyright 2002, Gregory Beaver
(phpDocumentor 1.1+)
@static
Description
Use the @static tag to declare a method or class to be static. Static elements can be called without reference to an instantiated class variable, as in class::method().
Example
Here's an example:
/**
* example of basic @static usage in a class
* Use this if every single method is static
* @static
*/
class mystaticclass
{
function function1($baz)
{
...
}
function function2()
{
...
}
}
/**
* example of a class with a single static method
*/
class myclass
{
/**
* @static
*/
function mystaticfunction()
{
...
}
}
// example of usage of static methods
mystaticclass::function1();
mystaticclass::function2();
myclass::mystaticfunction();