private function quote($target)
    {
        $wrapper = function($column) {
            return sprintf('`%s`', $column);
        };

        if (is_array($target)) {
            foreach($target as &$column) {
                $column = $this->needsQuoting($column) ? $wrapper($column) : $column;
            }

        } else if (is_scalar($target)) {
            $target = $this->needsQuoting($target) ? $wrapper($target) : $target;

        } else {
            throw new InvalidArgumentException(sprintf(
                'Unknown type for wrapping supplied "%s"', gettype($target)
            ));
        }

        return $target;
    }
private function quote($target)
    {
        $wrapper = function($column) {
            return sprintf('`%s`', $column);
        };

        if (is_array($target)) {
            foreach($target as &$column) {
                $column = $this->needsQuoting($column) ? $wrapper($column) : $column;
            }

        } else if (is_scalar($target)) {
            $target = $this->needsQuoting($target) ? $wrapper($target) : $target;

        } else {
            throw new InvalidArgumentException(sprintf(
                'Unknown type for wrapping supplied "%s"', gettype($target)
            ));
        }

        return $target;
    }
private function quote ( $ target ) { $ wrapper = function ( $ column ) { return sprintf ( '`%s`' , $ column ) ; } ; if ( is_array ( $ target ) ) { foreach ( $ target as & $ column ) { $ column = $ this -> needsQuoting ( $ column ) ? $ wrapper ( $ column ) : $ column ; } } else if ( is_scalar ( $ target ) ) { $ target = $ this -> needsQuoting ( $ target ) ? $ wrapper ( $ target ) : $ target ; } else { throw new InvalidArgumentException ( sprintf ( 'Unknown type for wrapping supplied "%s"' , gettype ( $ target ) ) ) ; } return $ target ; }
Wraps a string into back-ticks

@param string|array $target Target column name to be wrapped
@throws \InvalidArgumentException If unknown type supplied
@return string
Wraps a string into back - ticks