for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dazzle\MySQL\Support\Transaction;
use Dazzle\MySQL\TransactionInterface;
use SplObjectStorage;
class TransactionBox implements TransactionBoxInterface
{
/**
* @var SplObjectStorage
*/
protected $collection;
*
public function __construct()
$this->collection = new SplObjectStorage();
}
* @override
* @inheritDoc
public function isEmpty()
return $this->collection->count() <= 0;
public function add(TransactionInterface $trans)
$this->collection->attach($trans);
return $trans;
public function remove(TransactionInterface $trans)
$this->collection->detach($trans);