Documentation

CanRetrieveModel

Table of Contents

getModel()  : Model
Returns a model, one shared instance per request; falls back to the framework models when not found

Methods

getModel()

Returns a model, one shared instance per request; falls back to the framework models when not found

public getModel(string $model[, string|null $dir = null ]) : Model
Parameters
$model : string

Name of the model, sub-folders dot separated (e.g. "admin.User")

$dir : string|null = null

Set this when the model is stored in a specific directory, needs a trailing slash

Tags
throws
Exception

When the model does not exist

Return values
Model —

The model

Search results