public function getRegisteredModel($modelName)
    {
        try {
            $model = ArrayHelper::getValue($this->allModels, $modelName);
        } catch (KeyError $e) {
            $model = null;
        }
        if (null == $model) {
            throw new LookupError(
                sprintf("Models '%s' not registered.", $modelName)
            );
        }

        return $model;
    }