xPDO.getTableName

xPDO::getTableName

Gets the actual run-time table name from a specified class name.

Syntax

API Docs: http://api.modxcms.com/xpdo/xPDO.html#getTableName

string getTableName (string $className, [boolean $includeDb = false])

Example

Output the table name for the Box object with a table name of "boxes":

echo $xpdo->getTableName('Box');

See Also

Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab) or become an editor of the MODX Documentation.