Classes


Built-In Namespace _global_

Field Summary
Field Attributes Field Name and Description
 
not yet documented Developer Object for accessing developer account specific features.
Method Summary
Method Attributes Method Name and Description
 
__getArgs(argv, argnames, defaultVal)
Return an object containing the argument array passed in the first argument as values, and the members of the second argument as keys.
 
exit()
Ends the execution of the current sjs script and exits cleanly.
 
Use prototypal inheritance to create an instance of an object.
 
printf(str, args)
Convenience method for printing formatted strings.
Field Detail
Developer
not yet documented Developer Object for accessing developer account specific features.
Method Detail
{Object} __getArgs(argv, argnames, defaultVal)
Return an object containing the argument array passed in the first argument as values, and the members of the second argument as keys. If a third parameter is passed, this becomes the default value for any arguments whose values are not specified.
Parameters:
{Array} argv
Array of values
{String[]} argnames
Array of strings to use as keys. The order here is extremely important.
defaultVal Optional
Value to use as default for all undefined arguments. An array may be used to specify the defaults for each of the arguments. If this argument is not passed, then all undefined members are ignored.
Returns:
Object containing argnames members as keys and keys and argv members as values.

exit()
Ends the execution of the current sjs script and exits cleanly.

{Object} newInstanceOf(o)
Use prototypal inheritance to create an instance of an object.
<?
	var a = {one: 1, two: 2, three: 3}
	print(a.toJSON()); // {"one": 1, "two": 2, "three": 3}
	var b = newInstanceOf(a);
	print(b.toJSON()); // {"one":1, "two":2, "three": 3}
	b.two = 4;
	print(a.toJSON()); // {"one": 1, "two": 2, "three": 3}
	print(b.toJSON()); // {"two": 4, "one": 1, "three": 3}
	a.three = 6;
	print(a.toJSON()); // {"one": 1, "two": 2, "three": 6}
	print(b.toJSON()); // {"two": 4, "one": 1, "three": 6}
?>
Parameters:
{Object} o
Object from which to inherit.
Returns:
Object that inherits from o

printf(str, args)
Convenience method for printing formatted strings.

This is equivelant to calling print(myString.format(arg1, arg2, argN))

<?
	printf('<a href="%s" id="%s">%s</a>', link, id, 'Click Here');
?>
Parameters:
str
The format string
args
The arguments that will be inserted into the format string.
See:
String.format for format syntax

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 14 2011 05:41:50 GMT-0400 (EDT)