Returns the model on the scope, converting it to an array if it's not one.
341061
function() {
          if ( !(scope.model instanceof Array) ) {
            scope.model = scope.model ? [ scope.model ] : [];
          }
          return scope.model;
        }
181416
def model=(val)
      if val.is_a?(Promise)
        # Resolve the promise before setting
        self.last_promise = val

        val.then do |result|
          # Only assign if nothing else has been assigned since we started the resolve
          self.model = result if last_promise == val
        end.fail do |err|
          Volt.logger.error("Unable to resolve promise assigned to model on #{inspect}")
        end

        return
      end

      # Clear
      self.last_promise = nil

      # Start with a nil reactive value.
      self.current_model ||= Model.new

      if Symbol === val || String === val
        collections = [:page, :store, :params, :controller]
        if collections.include?(val.to_sym)
          self.current_model = send(val)
        else
          fail "#{val} is not the name of a valid model, choose from: #{collections.join(', ')}"
        end
      else
        self.current_model = val
      end
    end
57143
def model(name)
      model = created_model(name)
      return nil unless model
      Pickle::Adapter.get_model(model.class, model.id)
    end
1129865
def get_model(self):
        

        if self.lingeling and self.status == True:
            model = pysolvers.lingeling_model(self.lingeling)
            return model if model != None else []
887758
def read_new_model(method_name)
      if @persistor && @persistor.respond_to?(:read_new_model)
        return @persistor.read_new_model(method_name)
      else
        opts = @options.merge(parent: self, path: path + [method_name])

        if method_name.plural?
          return new_array_model([], opts)
        else
          return new_model({}, opts)
        end
      end
    end
557977
def get_model_from_key(key):
    """"""
    _known_models = {}
    model_name = key.split(':', 2)[0]
    # populate
    for klass in Model.__subclasses__():
        _known_models[klass.__name__] = klass
    return _known_models.get(model_name, None)
1029290
def get_for_model(self, obj):
        """"""
        qs = Tag.objects.language(get_language())
        qs = qs.filter(
            tagged_items__content_type=ctype_models.ContentType.objects.get_for_model(obj))  # NOQA
        return qs.distinct()
681084
def _get_model(self, appname, modelname):
        
        app = self._get_app(appname)
        models = app.get_models()
        model = None
        for mod in models:
            if mod.__name__ == modelname:
                model = mod
                return model
        msg = "Model " + modelname + " not found"
635381
function(index){
        var len = arguments.length, i = 0, results;

        if (len > 1) {
            results = [];

            while(len--){
                results.push(this.get(arguments[i++]));
            }

            return results;
        }

        return this._models[index];
    }
113395
function () {
                var model;
                try {
                    model = this["__model__"] || (this["__model__"] = this.patio.getModel(this._model, this.parent.db));
                } catch (e) {
                    model = this["__model__"] = this.patio.getModel(this.name, this.parent.db);
                }
                return model;
            }
1350472
def get_models(cls, index, as_class=False):
        '''
        
        '''
        try:
            return cls._index_to_model[index] if as_class else cls._idx_name_to_mdl_to_mdlidx[index].keys()
        except KeyError:
            raise KeyError('Could not find any index named {}. Is this index defined in BUNGIESEARCH["INDICES"]?'.format(index))
349994
function getModel (name) {
    // get global models register
    var models = getGlobal().models
    // require model to be defined
    assert(defined(models[name]), `${name} not defined`)
    // return model
    return models[name]
}
250865
protected function fetchModelScopes($model)
    {
        $reflection = new \ReflectionClass($model);

        foreach ($reflection->getMethods() as $method) {
            if (preg_match('~^scope(.+)$~i', $method->name, $match)) {
                if ($this->isHiddenScope($name = $match[1])
                    || $this->isDynamicScope($method)
                    || $this->hasHiddenFlag($method->getDocComment())
                    || 'scopeTranslated' === $match[0]) {
                    continue;
                }

                $scope = with(new Scope($name))->setQuery([$model, $name]);
                if ($icon = $this->hasIconFlag($method->getDocComment())) {
                    $scope->setIcon($icon);
                }

                $this->addScope($scope);
            }
        }
    }
221466
def get_model(self):
        
        if hasattr(self, 'model') and self.model:
            return self.model
        # Give me a "none" queryset
        try:
            none = self.get_queryset().none()
            return none.model
        except Exception:
            raise ImproperlyConfigured(
                "Integrator: Unable to determine the model with this queryset."
                " Please add a `model` property")
649191
def get_model(model):
    
    try:
        if isinstance(model, str):
            app_label, model_name = model.split('.', 1)
            m = loading.get_model(app_label, model_name)
            if not m:  # pragma: no cover
                raise LookupError()  # Django < 1.7 just returns None
            return m
        elif issubclass(model, models.Model):
            return model
    except (LookupError, ValueError):
        pass
    raise ValueError(model)
386988
function(){
      var result = [];

      ko.utils.arrayForEach(this.models(), function(model){
        result.push(model.toJSON());
      });

      return result;
    }
60266
protected function scaffoldScopes()
    {
        $this->scopes = new Mutable();

        if ($model = $this->model()) {
            $this->fetchModelScopes($model);

            $this->addSoftDeletesScopes($model);
        }

        return $this->scopes;
    }