private function resolveBackendClass()
    {
        $parser = new ArgvInput();
        $backend = $parser->getParameterOption('--backend', null);

        if (null === $backend) {
            // Do not use this feature for typical use case.
            // Overriding backend using env var provided only for
            // testing purposes and may be removed in the future.
            // You SHOULD NOT rely on this possibility.
            if (getenv('ZEPHIR_BACKEND')) {
                $backend = $backend = getenv('ZEPHIR_BACKEND');
            } elseif ($this->container->has('ZEPHIR_BACKEND')) {
                $backend = $this->container->get('ZEPHIR_BACKEND');
            }
        }

        if (null === $backend) {
            $backend = BaseBackend::getActiveBackend();
        }

        $className = "Zephir\\Backends\\{$backend}\\Backend";

        if (!class_exists($className)) {
            throw new IllegalStateException(sprintf('Backend class "%s" doesn\'t exist.', $backend));
        }

        return $className;
    }