class ModelManifest implements ModelManifestInterface (View source)

Properties

protected $models

The collection of models to register to this manifest.

Methods

__construct()

The model manifest instance.

void
register(Collection $models)

Register models.

Model
getRegisteredModel(string $baseModelClass)

Get the registered model for a base model class.

void
removeModel(string $baseModelClass)

Removes model from manifest.

void
swapModel(string $currentModelClass, string $newModelClass)

Swap the model implementation.

string|null
getMorphClassBaseModel(string $morphClass)

Get the morph class base model.

Collection
getBaseModelClasses()

Get list of registered base model classes.

Collection
getRegisteredModels()

Get list of all registered models.

Details

__construct()

The model manifest instance.

void register(Collection $models)

Register models.

Parameters

Collection $models

Return Value

void

Model getRegisteredModel(string $baseModelClass)

Get the registered model for a base model class.

Parameters

string $baseModelClass

Return Value

Model

void removeModel(string $baseModelClass)

Removes model from manifest.

Parameters

string $baseModelClass

Return Value

void

void swapModel(string $currentModelClass, string $newModelClass)

Swap the model implementation.

Parameters

string $currentModelClass
string $newModelClass

Return Value

void

string|null getMorphClassBaseModel(string $morphClass)

Get the morph class base model.

Parameters

string $morphClass

Return Value

string|null

Collection getBaseModelClasses()

Get list of registered base model classes.

Return Value

Collection

Collection getRegisteredModels()

Get list of all registered models.

Return Value

Collection