ptut-vhost/build/database/core/PDOWrapper/PDOStatementWrapper.php

51 lines
821 B
PHP

<?php
/**
* Created by PhpStorm.
* User: lucas
* Date: 30/08/16
* Time: 17:42
*/
namespace database\core\PDOWrapper;
class PDOStatementWrapper extends \PDOStatement
{
private $statement;
private $parameters;
private $connexion;
public function __construct($statement, PDOWrapper $connexion)
{
$this->statement = $statement;
$this->connexion = $connexion;
}
public function execute($input_parameters = [])
{
$this->parameters = $input_parameters;
$this->connexion->stackStatement($this);
return true;
}
/**
* @return string
*/
public function getStatement()
{
return $this->statement;
}
/**
* @return array
*/
public function getParameters()
{
return $this->parameters;
}
}