Ejemplo n.º 1
0
 /**
  * @param PreparableSqlInterface $sqlObject
  * @param StatementInterface|null $statement
  * @return StatementInterface
  */
 public function prepareStatementForSqlObject(PreparableSqlInterface $sqlObject, StatementInterface $statement = null)
 {
     $statement = $statement ?: $this->adapter->getDriver()->createStatement();
     if ($this->sqlPlatform) {
         $this->sqlPlatform->setSubject($sqlObject);
         $this->sqlPlatform->prepareStatement($this->adapter, $statement);
     } else {
         $sqlObject->prepareStatement($this->adapter, $statement);
     }
     return $statement;
 }