for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Phossa Project
*
* PHP version 5.4
* @category Library
* @package Phossa2\Query
* @copyright Copyright (c) 2016 phossa.com
* @license http://mit-license.org/ MIT License
* @link http://www.phossa.com/
*/
/*# declare(strict_types=1); */
namespace Phossa2\Query\Traits;
use Phossa2\Query\Interfaces\StatementInterface;
* PreviousTrait
* Dealing with multiple statements, e.g.
* - SELECT ... UNION ... SELECT
* - INSERT INTO ... SELECT
* @author Hong Zhang <[email protected]>
* @version 2.0.0
* @since 2.0.0 added
trait PreviousTrait
{
* Previous statement used in UNION/UNION ALL
* @var StatementInterface
* @access protected
protected $previous;
* Set previous statement
* @param StatementInterface $stmt
* @return $this
protected function setPrevious(StatementInterface $stmt)
$this->previous = $stmt;
return $this;
}
* Has previous statement ?
* @return bool
protected function hasPrevious()/*# : bool */
return null !== $this->previous;
* Get previous statement
* @return StatementInterface
protected function getPrevious()/*# : StatementInterface */
return $this->previous;