adoSchema::prefix PHP Method

prefix() public method

Returns an object name with the current prefix prepended.
public prefix ( string $name = '' ) : string
$name string Name
return string Prefixed name
    function prefix($name = '')
    {
        // if prefix is set
        if (!empty($this->objectPrefix)) {
            // Prepend the object prefix to the table name
            // prepend after quote if used
            return preg_replace('/^(`?)(.+)$/', '$1' . $this->objectPrefix . '$2', $name);
        }
        // No prefix set. Use name provided.
        return $name;
    }