ProgressTrait
Allow to enable or disable trait on the current model instance ($progress) or globally for every model instance ($staticProgress)
- Full name:
\Zemit\Mvc\Model\Behavior\Traits\ProgressTrait
Properties
progress
public bool $progress
staticProgress
public static bool $staticProgress
- This property is static.
Methods
getProgress
Return true if the behavior is progress on the current model instance
public getProgress(): bool
setProgress
Set true to enable the behavior on the current model instance
public setProgress(bool $progress): void
Parameters:
Parameter | Type | Description |
---|---|---|
$progress | bool |
getStaticProgress
Return true if the behavior is progress globally for every model instance
public static getStaticProgress(): bool
- This method is static.
setStaticProgress
Set true to enable the behavior globally for every model instance
public static setStaticProgress(bool $staticProgress): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$staticProgress | bool |
start
Enable the behavior on the current model instance
public start(): void
stop
Disable the behavior on the current model instance
public stop(): void
staticStart
Enable the behavior globally for every model instance
public static staticStart(): void
- This method is static.
staticStop
Disable the behavior globally for every model instance
public static staticStop(): void
- This method is static.
inProgress
Return true if the behavior is in progress on the current model instance and globally
public inProgress(): bool
isStarted
Return true if the behavior is started on the current model instance and globally
public isStarted(): bool
isStopped
Return true if the behavior is stopped on the current model instance and globally
public isStopped(): bool