public function createAdapter($collection)
    {
        if (\is_array($collection)) {
            $className = 'Array';
        } else {
            try {
                $r = new \ReflectionClass($collection);
                $className = $r->getName();
            } catch (\ReflectionException $exc) {
                throw new AdapterNotSupportedException($collection);
            }
        }

        $adapterName =
            __NAMESPACE__ . "\\" . $className . 'Adapter'
        ;

        return new $adapterName($collection);
    }