lithium\data\source\Database::name PHP Method

name() public method

Field name handler to ensure proper escaping.
public name ( string $name ) : string
$name string Field or identifier name.
return string Returns `$name` quoted according to the rules and quote characters of the database adapter subclass.
    public function name($name)
    {
        if (isset($this->_cachedNames[$name])) {
            return $this->_cachedNames[$name];
        }
        list($open, $close) = $this->_quotes;
        list($first, $second) = $this->_splitFieldname($name);
        if ($first) {
            $result = "{$open}{$first}{$close}.{$open}{$second}{$close}";
        } elseif (preg_match('/^[a-z0-9_-]+$/iS', $name)) {
            $result = "{$open}{$name}{$close}";
        } else {
            $result = $name;
        }
        return $this->_cachedNames[$name] = $result;
    }