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 498 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The parameters are of type array and
Boolean respectively. The array type includes associative arrays; more information
about array parameters and return types is given in the description of each method.
The ampersand denotes that anArray will be passed by reference:
someMethod( &anArray : array, xyz : boolean ) : string
The next example returns a reference (denoted by the ampersand before the method
name) to an instance of a JObject class. Methods and functions that return a reference
must use the =& assignment operator to prevent copying of the returned value.
??? ??? ???
Appendix
[ 366 ]
The returned object can be a subclass of JObject. The string parameter message is
optional, and if it is not specified, it will contain the default value foobar:
&anotherMethod( message : string='foobar' ) : JObject
This last example doesn't return a value; this is signified by the return type void. The
someParameter parameter is of type mixed. A mixed type means that the value can
be any type:
andAnotherMethod( someParameter : mixed ) : void
It is important to remember that all method and property names
that begin with an underscore are to be treated as private/protected.


Pages:
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510