Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in
/home3/zeenyxor/public_html/b2evolution1/inc/plugins/model/_plugins_admin.class.php on line
1466
Deprecated: Array and string offset access syntax with curly braces is deprecated in
/home3/zeenyxor/public_html/b2evolution1/plugins/_auto_p.plugin.php on line
502
Deprecated: Array and string offset access syntax with curly braces is deprecated in
/home3/zeenyxor/public_html/b2evolution1/plugins/_auto_p.plugin.php on line
500
Deprecated: Array and string offset access syntax with curly braces is deprecated in
/home3/zeenyxor/public_html/b2evolution1/plugins/_auto_p.plugin.php on line
500
Deprecated: Array and string offset access syntax with curly braces is deprecated in
/home3/zeenyxor/public_html/b2evolution1/plugins/_texturize.plugin.php on line
116
The Zee language allows classes to be extended. This feature allows the user to add methods and properties to a built-in or user-defined class. To extend a class, use the keyword ‘extend’ as in the following example:
extend class Math
static Number MyNewMethod (Number nValue)
{body of method}
MyNewMethod is now available along with all of the other built-in methods of the Math class. Here are some notes to enhance your understanding of ‘extend’:
- Methods and properties can be added to user-defined or built-in classes.
- Regular and app classes can be extended.
- Properties can only be added for app classes.
- Built-in types that provide methods, like Integer, Enum, Real, String can not be extended.
- Classes can be extended in the same or in different files from the base class being extended.
Extension methods and properties are called like their regular counterparts.