CWIS Developer Documentation
Static Public Member Functions | List of all members
StdLib Class Reference

Standard utility library. More...

Static Public Member Functions

static GetMyCaller ()
 Get string with file and line number for call to current function. More...
 
static CheckMyCaller ($DesiredCaller, $ExceptionMsg=NULL)
 Check the caller of the current function. More...
 
static Pluralize ($Word)
 Pluralize an English word. More...
 
static Singularize ($Word)
 Singularize an English word. More...
 

Detailed Description

Standard utility library.

Definition at line 14 of file StdLib.php.

Member Function Documentation

static StdLib::CheckMyCaller (   $DesiredCaller,
  $ExceptionMsg = NULL 
)
static

Check the caller of the current function.

In the desired caller parameter, if a file name is specified it should include the ".php" extension but should not have a leading path. In the exception message parameter, the following strings can be used and the appropriate values will be substituted in: FILE% (no leading path), LINE%, FULLFILE% (includes leading path), CLASS%, FUNCTION%, and METHOD% (equivalent to "%CLASS%::%FUNCTION%").

Parameters
string$DesiredCallerString describing desired caller, in the form "Class", "Class::Method", "Function", "File", or "File:Line".
string$ExceptionMsgIf specified and the caller was not the desired caller, an exception will be thrown with this message. (OPTIONAL)
Returns
bool TRUE if caller matched desired caller, otherwise FALSE.

Definition at line 47 of file StdLib.php.

Referenced by Plugin\__construct(), SPTImage\ClearImageSymlinksForResource(), MetadataField\Drop(), SPTImage\GetImageUrlForResource(), Plugin\InstalledVersion(), Plugin\IsInstalled(), and Plugin\IsReady().

Here is the caller graph for this function:

static StdLib::GetMyCaller ( )
static

Get string with file and line number for call to current function.

Returns
string String with caller info in the form "FILE:LINE".

Definition at line 23 of file StdLib.php.

static StdLib::Pluralize (   $Word)
static

Pluralize an English word.

Parameters
string$WordWord to make plural.
Returns
string Word in plural form.

Definition at line 105 of file StdLib.php.

static StdLib::Singularize (   $Word)
static

Singularize an English word.

Parameters
string$WordWord to make singular.
Returns
string Word in singular form.

Definition at line 141 of file StdLib.php.

Referenced by MetadataSchema\Create().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: