| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 | <?php/** * * Cube Framework $Id$ /xW/xE+jKV5ntgS3zfHTUNQt6FOHFy0FyL5wvuq9+YM= * * @link        http://codecu.be/framework * @copyright   Copyright (c) 2014 CodeCube SRL * @license     http://codecu.be/framework/license Commercial License * * @version     1.0 *//** * db statement abstract class */namespace Cube\Db\Statement;use Cube\Db,    Cube\Db\Adapter\AbstractAdapter;abstract class AbstractStatement implements StatementInterface{    /**     *     * driver level statement resource     *     * @var resource|object     */    protected $_stmt = null;    /**     *     * database adapter     *     * @var \Cube\Db\Adapter\AbstractAdapter     */    protected $_adapter = null;    /**     *     * The current fetch mode.     *     * @var integer     */    protected $_fetchMode = Db::FETCH_ASSOC;    /**     *     * statement attributes     *     * @var array     */    protected $_attributes = array();    /**     *     * column result bindings     *     * @var array     */    protected $_bindColumn = array();    /**     *     * query parameter bindings     *     * @var array     */    protected $_bindParam = array();    /**     *     * class constructor     *     * @param \Cube\Db\Adapter\AbstractAdapter $adapter     * @param mixed                            $sql a string or \Cube\Db\Select     */    public function __construct(AbstractAdapter $adapter, $sql)    {        $this->_adapter = $adapter;        if ($sql instanceof Db\Select) {            $sql = $sql->assemble();        }        $this->_prepare($sql);    }    /**     *     * the method will be implemented at the driver level     *     * @param mixed $sql     *     * @return void     */    protected function _prepare($sql)    {        return;    }}
 |