refactored wrap method for readability.
This commit is contained in:
parent
82a0218011
commit
e678b77b5b
|
@ -635,12 +635,17 @@ private function wrap($value)
|
||||||
{
|
{
|
||||||
if (strpos(strtolower($value), ' as ') !== false)
|
if (strpos(strtolower($value), ' as ') !== false)
|
||||||
{
|
{
|
||||||
return $this->wrap_alias($value, $connection);
|
return $this->wrap_alias($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wrap = $this->connection->wrapper();
|
$wrap = $this->connection->wrapper();
|
||||||
|
|
||||||
return implode('.', array_map(function($segment) use ($wrap) { return ($segment != '*') ? $wrap.$segment.$wrap : $segment; }, explode('.', $value)));
|
foreach (explode('.', $value) as $segment)
|
||||||
|
{
|
||||||
|
$wrapped[] = ($segment != '*') ? $wrap.$segment.$wrap : $segment;
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode('.', $wrapped);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue