Is there a pattern/name for a concept of a "lens" or "specification" pre-applied...

@ocramius@mastodon.social

Is there a pattern/name for a concept of a "lens" or "specification" pre-applied to a persistence repository?

Thinking, roughly:

```php
interface SuperSecretStuffRepository {
function find(SomeId): VeryImportant;
}

interface FilterForUser {
function apply(User, SuperSecretStuffRepository): SuperSecretStuffRepository;
}
```

It certainly is some sort of decorator.

Pseudo-code is #php