Common
[ class tree: Common ] [ index: Common ] [ all elements ]

Class: Utils

Source Location: /common/Utils.php

Class Overview


Utility class containing static methods for various common tasks.


Methods



Class Details

[line 30]
Utility class containing static methods for various common tasks.



[ Top ]


Class Methods


method addslashes [line 137]

mixed addslashes( mixed $data, [boolean $magic_on = NULL])

Escapes special characters taking into account if magic_quotes_gpc is ON or not. Multidimensional arrays are accepted.



Tags:

static:  
access:  public


Parameters:

mixed   $data  
boolean   $magic_on   (optional) magic_quotes_gpc status. Detected if missing.

[ Top ]

method checkDbError [line 160]

void checkDbError( object Database $db, [string $msg = ''])

Wrapper for PEAR::isError, which throws an exception in case of failure



Tags:

static:  
access:  public


Parameters:

object Database   $db   object to test for error
string   $msg   optional error message condition

[ Top ]

method copyProperties [line 40]

mixed copyProperties( mixed $from_object, mixed $to_object)

Copies values from an objet to another. It uses reflection for reading the properties of each objects.



Tags:

static:  
access:  public


Parameters:

mixed   $from_object  
mixed   $to_object  

[ Top ]

method copyVars [line 66]

mixed copyVars( mixed $from_object, mixed $to_object)

Copies values from an objet to another. It only updates if destination var exists. Does not use reflection.



Tags:

static:  
access:  public


Parameters:

mixed   $from_object  
mixed   $to_object  

[ Top ]

method makeDirectoryWithPerms [line 113]

void makeDirectoryWithPerms( string $directory, string $permsFrom)

Creates a directory recursively. The permissions of the newly created directories are the same as the permission of the given $permsFrom file or directory.



Tags:

static:  
access:  public


Parameters:

string   $directory   The directory to create (can create recursively)
string   $permsFrom   Permissions of the newly created directory are the same as this file or directory.

[ Top ]

method parseArray [line 173]

array parseArray( string $value)

Converts a comma-separated string to an array



Tags:

access:  public
static:  


Parameters:

string   $value  

[ Top ]

method pathToPlatform [line 98]

string pathToPlatform( string $path)

Converts a path with any delimitors to a path with delimitors used by the current platform.



Tags:

static:  
access:  public


Parameters:

string   $path  

[ Top ]

method pathToUnix [line 85]

string pathToUnix( string $path)

Converts a path to unix path delmitors.



Tags:

static:  
access:  public


Parameters:

string   $path  

[ Top ]


Documentation generated on Fri, 11 Nov 2005 11:00:25 +0000 by phpDocumentor 1.3.0RC3