Site
public class Site
| Field Summary | |
|---|---|
| final mixed | The gettext domain for Site. |
| final mixed | The package identifier. |
| Method Summary | |
|---|---|
| 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 configuration definitions used by the Site package. |
| 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 | |
public final mixed GETTEXT_DOMAIN = 'site'
The gettext domain for Site
This is used to support multiple locales.
public final mixed PACKAGE_ID = 'Site'
The package identifier
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 getConfigDefinitions()
Gets configuration definitions used by the Site package
Applications should add these definitions to their config module before loading the application configuration.
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 setupGettext()
Container for package wide static methods