Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Jun 27, 2012
  1. Fix return statement for the method.

    authored
    The method now correctly returns the calculated value (i.e.  when
    the date is not contained in the date range and  if it is).
Commits on Apr 23, 2012
  1. Revert "Change comparison for key assertion."

    authored
    This reverts commit e8cdf9c. It appears that
    the reason for unexpected results was to blame on the client code.
Commits on Apr 12, 2012
  1. Fix return value.

    authored
Commits on Apr 11, 2012
Commits on Apr 4, 2012
  1. Add method to test if the key *fits* the lock.

    authored
    Example:
    
    ```php
    <?php
    
    $secret = '$3crt3t';
    
    // Create a Lock that is locked
    $lock = new Spil\Lock(new Spil\LockState\LockedState(), $secret);
    $key = new Spil\Key("invalid");
    
    if ($lock->fits(key)) {
        $lock->unlock(key);
    } else {
        printf("The key %s does not fit", key);
    }
    ```
Commits on Apr 3, 2012
Commits on Mar 26, 2012
  1. Expose the teeth for the lock.

    authored
    This should be replaced by implementing some sort of memento pattern.
Commits on Mar 23, 2012
  1. Fix file names.

    authored
    The file names are now compatible with the underlying class names.
  2. Change object constructor.

    authored
    The `from` and `until` fields are now optional.
Commits on Mar 21, 2012
  1. Add implementation for null locks.

    authored
    A null lock is useful when the lock might not always be present.
    
    Usage:
    
        $lock = new Spil\Lock(new Spil\LockState\NullLockState());
    
        if ($lock->getState() instanceof Spil\LockState\NullLockStateInterface) {
            throw new DomainException('No valid lock available');
        }
  2. Add composer configuration.

    authored
  3. Add namespaces.

    authored
  4. Fix typo.

    authored
Commits on Mar 20, 2012
  1. Add factory class to ease the construction of locks.

    authored
    Usage:
    
        $facatory = new LockFactory();
        $lock = $factory->createUnlockedLock("secret");
  2. Fix markdown formatting.

    authored
  3. Add example for a time lock.

    authored
  4. Add lock states for temporal locks.

    authored
    Usage:
    
        $lock = new Lock(new TemporalLockedState(new Timeframe(new DateTime('10 days ago'), new DateTime('yesterday'))));
    
        // throw DomainException: Timelock active
        $lock->unlock();
  5. Change argument order for `Lock` constructor.

    authored
    This allows for the creation of `null` locks.
  6. Add missing `Key` class.

    authored
Something went wrong with that request. Please try again.