SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 53 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The first line is a general description of the function, this description can
span more than one line. @param and @return are tags.
The @param tag is used to define a parameter in the format (the name is optional):
@param type [$name] description
The @return tag is used to define the return value in the format:
@return type description
So our initial example is telling us that the addition() function has two integer
parameters named that it will add togther and return the resultant integer value.
When we document complex functions, we might want to provide two descriptions,
a long description and a short description. This example demonstrates how we
do this:
/**
* Does some complex processing
*
* A verbose description of the function that spans more than
* one line
*
* @param int $value1 Base value
Getting Started
[ 38 ]
* @param int $value2 Value to add
* @return int Resultant vaue
*/
function someComplexFunction($value1, $value2)
{
// does some complex processing
}
Functions are not the only elements that can be documented.


Pages:
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6