lox / pheasant

A lightweight data mapper designed to take advantage of PHP 5.3+
http://getpheasant.com
MIT License
101 stars 21 forks source link

DomainObject::lock no longer throws stale exceptions #95

Closed lox closed 10 years ago

lox commented 10 years ago

provides closure to opt-in instead.

<?php

Llama::byId(1)->lock(function($was, $now) {
   throw new \Exception("Object has changed since acquiring lock");
}));