The Awesome Class¶
-
class
Cool\Namespace\
Awesome
¶ Ova super klasa radi super stvari. Instancira se ovako:
$awesome = new Awesome('param');
someStaticMethod¶
- static
Cool\Namespace\Awesome::
someStaticMethod
($someParam)¶This method is static. See the
.rst
source file for how this is defined. Also notice that this method appears in the TOC, there is no section heading in the actual body of the document. This is because of a customhidden
role which hides the heading in the body, but lets Sphinx render it in the TOC. If you just put a heading there without the “hidden” part, you’d get the same result, except that the heading would show in the content as well, thus duplicating the function name.
Parametri:
- $someParam (string) – A parameter needed by the method
Vraća: void, or throws an \InvalidArgumentException if the param is invalid
Usage:
Awesome::someStaticMethod($someParam);
anotherMethod¶
Keep adding methods like this for everything you want to document. It is recommended to only document public methods like this. Private and protected methods should stay isolated and only documented in the source code.