```php
if ($data instanceof Selectable) {
    return new SelectableAdapter($data, $this->createCriteria($criteria));
}

if ($data instanceof Collection) {
    return new CollectionAdapter($data);
}

// throw exception
```