AppserverIo\Appserver\PersistenceContainer\Doctrine\DoctrineEntityManagerProxy::transactional PHP Method

transactional() public method

The function gets passed this EntityManager instance as an (optional) parameter. {@link flush} is invoked prior to transaction commit. If an exception occurs during execution of the function or flushing or transaction commit, the transaction is rolled back, the EntityManager closed and the exception re-thrown.
public transactional ( callable $func ) : mixed
$func callable The function to execute transactionally.
return mixed The non-empty value returned from the closure or true instead.
    public function transactional($func)
    {
        return $this->__call('transactional', array($func));
    }