Propel API
Class

ClassTools

class ClassTools

Tools to support class & package inclusion and referencing.

Methods

static string classname(string $qualifiedName)

Gets just classname, given a dot-path to class.

static string getFilePath(string $path, string $classname = null, string $extension = '.php')

Gets the path to be used in include()/require() statement.

static string createFilePath(string $path, string $classname = null, string $extension = '.php')

This method remplaces the `getFilePath()` method in OMBuilder as we consider `$path` as a real path instead of a dot-notation value.

static string getBasePeer(Table $table)

Gets the basePeer path if specified for table/db.

static string getBaseClass(Table $table)

Gets the baseClass path if specified for table/db.

static string getInterface(Table $table)

Gets the interface path if specified for table.

static array getPhpReservedWords()

Gets a list of PHP reserved words.

Details

at line 26
static public string classname(string $qualifiedName)

Gets just classname, given a dot-path to class.

Parameters

string $qualifiedName

Return Value

string

at line 51
static public string getFilePath(string $path, string $classname = null, string $extension = '.php')

Gets the path to be used in include()/require() statement.

Supports multiple function signatures:

(1) getFilePath($dotPathClass);
(2) getFilePath($dotPathPrefix, $className);
(3) getFilePath($dotPathPrefix, $className, $extension);

Parameters

string $path dot-path to class or to package prefix.
string $classname class name
string $extension The extension to use on the file.

Return Value

string The constructed file path.

at line 68
static public string createFilePath(string $path, string $classname = null, string $extension = '.php')

This method remplaces the `getFilePath()` method in OMBuilder as we consider `$path` as a real path instead of a dot-notation value.

`$path` is generated by the `getPackagePath()`
method.

Parameters

string $path path to class or to package prefix.
string $classname class name
string $extension The extension to use on the file.

Return Value

string The constructed file path.

at line 86
static public string getBasePeer(Table $table)

Gets the basePeer path if specified for table/db.

If not, will return 'propel.util.BasePeer'

Parameters

Table $table

Return Value

string

at line 101
static public string getBaseClass(Table $table)

Gets the baseClass path if specified for table/db.

If not, will return 'propel.om.BaseObject'

Parameters

Table $table

Return Value

string

at line 116
static public string getInterface(Table $table)

Gets the interface path if specified for table.

If not, will return 'propel.om.Persistent'.

Parameters

Table $table

Return Value

string

at line 131
static public array getPhpReservedWords()

Gets a list of PHP reserved words.

Return Value

array string[]