mirror of
https://github.com/dg/dibi.git
synced 2025-08-02 20:27:35 +02:00
DibiTranslator: object is initialized in constructor
This commit is contained in:
@@ -51,6 +51,8 @@ final class DibiTranslator extends DibiObject
|
|||||||
public function __construct(DibiConnection $connection)
|
public function __construct(DibiConnection $connection)
|
||||||
{
|
{
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
|
$this->driver = $connection->getDriver();
|
||||||
|
$this->identifiers = new DibiHashMap(array($this, 'delimite'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -62,9 +64,6 @@ final class DibiTranslator extends DibiObject
|
|||||||
*/
|
*/
|
||||||
public function translate(array $args)
|
public function translate(array $args)
|
||||||
{
|
{
|
||||||
$this->identifiers = new DibiHashMap(array($this, 'delimite'));
|
|
||||||
$this->driver = $this->connection->getDriver();
|
|
||||||
|
|
||||||
$args = array_values($args);
|
$args = array_values($args);
|
||||||
while (count($args) === 1 && is_array($args[0])) { // implicit array expansion
|
while (count($args) === 1 && is_array($args[0])) { // implicit array expansion
|
||||||
$args = array_values($args[0]);
|
$args = array_values($args[0]);
|
||||||
|
Reference in New Issue
Block a user