Swat
public class Swat
| Field Summary | |
|---|---|
| final mixed | The gettext domain for Swat. |
| final mixed | The package identifier. |
| Constructor Summary | |
|---|---|
Swat() Don't allow instantiation of the Swat object. |
|
| Method Summary | |
|---|---|
| static void | displayInlineJavaScript(string javascript) Displays inline JavaScript properly encapsulating the script in a CDATA section. |
| static void | displayMethods(mixed object) Displays the methods of an object. |
| static void | displayProperties(mixed object) Displays the properties of an object. |
| static array | Gets the packages this package depends on. |
| static string | gettext(string message) Translates a phrase. |
| static string | ngettext(string singular_message, string plural_message, integer number) Translates a plural phrase. |
| static void | printObject(mixed object) Displays an object's properties and values recursively. |
| static void | |
public final mixed GETTEXT_DOMAIN = 'swat'
The gettext domain for Swat
This is used to support multiple locales.
public final mixed PACKAGE_ID = 'Swat'
The package identifier
public Swat()
Don't allow instantiation of the Swat object
This class contains only static methods and should not be instantiated.
public static void displayInlineJavaScript(string javascript)
Displays inline JavaScript properly encapsulating the script in a CDATA section
javascript - the inline JavaScript to display.public static void displayMethods(mixed object)
Displays the methods of an object
This is useful for debugging.
object - the object whose methods are to be displayed.public static void displayProperties(mixed object)
Displays the properties of an object
This is useful for debugging.
object - the object whose properties are to be displayed.public static array getDependencies()
Gets the packages this package depends on
public static string gettext(string message)
Translates a phrase
This method relies on the php gettext extension and uses dgettext() internally.
message - the phrase to be translated.public static string ngettext(string singular_message, string plural_message, integer number)
Translates a plural phrase
This method should be used when a phrase depends on a number. For example, use ngettext when translating a dynamic phrase like:
This method relies on the php gettext extension and uses dngettext() internally.
singular_message - the message to use when the number the phrase depends on is one.plural_message - the message to use when the number the phrase depends on is more than one.number - the number the phrase depends on.public static void printObject(mixed object)
Displays an object's properties and values recursively
Note:
If the object being printed is a UI object then its parent property is temporarily set to null to prevent recursing up the widget tree.
object - the object to display.public static void setupGettext()
Container for package wide static methods