LPModelCollection
in package
Table of Contents
Properties
- $models : array<string, LPModel>
- We expose this as public to avoid the overhead of a getter, When you use this property directly, you should know what you're doing
Methods
- add() : void
- Adds a model to the collection, throws an exception if the model already exists
- get() : LPModel
- Returns a model by name, throws an exception if the model doesn't exist
- has() : bool
- Returns true if the model exists in the collection
Properties
$models
We expose this as public to avoid the overhead of a getter, When you use this property directly, you should know what you're doing
public
array<string, LPModel>
$models
= []
Methods
add()
Adds a model to the collection, throws an exception if the model already exists
public
add(LPModel $model) : void
Parameters
- $model : LPModel
get()
Returns a model by name, throws an exception if the model doesn't exist
public
get(string $name) : LPModel
Parameters
- $name : string
Return values
LPModelhas()
Returns true if the model exists in the collection
public
has(string $name) : bool
Parameters
- $name : string