silverorange Code


Site.Site
/Site/Site.php at line 15

Class Site

Site

public class Site

Container for package wide static methods

Copyright:
2005-2006 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
final mixed

GETTEXT_DOMAIN

The gettext domain for Site.

final mixed

PACKAGE_ID

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

getConfigDefinitions()

Gets configuration definitions used by the Site package.

static array

getDependencies()

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

setupGettext()

Field Detail

/Site/Site.php at line 29

GETTEXT_DOMAIN

public final mixed GETTEXT_DOMAIN = 'site'

The gettext domain for Site

This is used to support multiple locales.


/Site/Site.php at line 22

PACKAGE_ID

public final mixed PACKAGE_ID = 'Site'

The package identifier


Method Detail

/Site/Site.php at line 114

displayMethods

public static void displayMethods(mixed object)

Displays the methods of an object

This is useful for debugging.

Parameters:
object - the object whose methods are to be displayed.

/Site/Site.php at line 135

displayProperties

public static void displayProperties(mixed object)

Displays the properties of an object

This is useful for debugging.

Parameters:
object - the object whose properties are to be displayed.

/Site/Site.php at line 176

getConfigDefinitions

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.

Returns:
the configuration definitions used by the Site package.
See Also:
SiteConfigModule::addDefinitions()

/Site/Site.php at line 158

getDependencies

public static array getDependencies()

Gets the packages this package depends on

Returns:
an array of package IDs that this package depends on.

/Site/Site.php at line 61

gettext

public static string gettext(string message)

Translates a phrase

This method relies on the php gettext extension and uses dgettext() internally.

Parameters:
message - the phrase to be translated.
Returns:
the translated phrase.

/Site/Site.php at line 89

ngettext

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.

Parameters:
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.
Returns:
the translated phrase.

/Site/Site.php at line 98

setupGettext

public static void setupGettext()

silverorange Code