SoftDeleteBehavior
        
        extends ModelBehavior
    
    
            
            in package
            
        
    
    
    
        
            Instead of deleting a record toggle a flag.
Table of Contents
- $backend : RepositoryBackend
 - $configs : array<string|int, ModelConfig>
 - The available models in this backend.
 - $identifier : string
 - $junctions : array<string|int, mixed>|ModelConfig
 - The junction tables.
 - $path : mixed
 - __call() : mixed
 - Report that the $method doesn't exist.
 - __callStatic() : mixed
 - Report that the $method doesn't exist.
 - __construct() : mixed
 - __get() : mixed
 - Report that $property doesn't exist.
 - __set() : mixed
 - Report that $property doesn't exist and set the property to the given $value.
 - __toString() : string
 - The object is used as an string.
 - add() : mixed
 - Add a new record.
 - all() : Collection
 - Retrieve all non-deleted model-data.
 - delete() : mixed
 - Instead of deleting set the flag.
 - get() : mixed
 - Retrieve non-deleted model-data by id.
 - register() : mixed
 - Remove the "is_deleted" property from the mapping.
 - related() : Traversable|array<string|int, mixed>
 - Retrieve all related model-data.
 - renameModel() : mixed
 - Rename a model and remap the relations to the new name.
 - renameProperty() : mixed
 - Rename a property and remap the relations to the new name.
 - skipProperty() : mixed
 - Remove a property.
 - update() : mixed
 - Update an existing record.
 
Properties
$backend
    public
        RepositoryBackend
    $backend
    
    
    
    
$configs
The available models in this backend.
    public
        array<string|int, ModelConfig>
    $configs
    
    
        array('Model name' => ModelConfig, 'Model2 name' => ModelConfig, ...)
$identifier
    public
        string
    $identifier
    
    
    
    
$junctions
The junction tables.
    public
        array<string|int, mixed>|ModelConfig
    $junctions
     = []
    
    
    
$path
    private
        mixed
    $path
    
        
        
    
Methods
__call()
Report that the $method doesn't exist.
    public
                __call(string $method, array<string|int, mixed> $arguments) : mixed
    
        Parameters
- $method : string
 - $arguments : array<string|int, mixed>
 
Return values
mixed —__callStatic()
Report that the $method doesn't exist.
    public
            static    __callStatic(string $method, array<string|int, mixed> $arguments) : mixed
    
        Parameters
- $method : string
 - $arguments : array<string|int, mixed>
 
Return values
mixed —__construct()
    public
                __construct([mixed $path = 'is_deleted' ]) : mixed
        
        Parameters
- $path : mixed = 'is_deleted'
 
Return values
mixed —__get()
Report that $property doesn't exist.
    public
                __get(string $property) : mixed
    
        Parameters
- $property : string
 
Return values
mixed —__set()
Report that $property doesn't exist and set the property to the given $value.
    public
                __set(string $property, mixed $value) : mixed
    
        Parameters
- $property : string
 - $value : mixed
 
Return values
mixed —__toString()
The object is used as an string.
    public
                __toString() : string
    
    
    
        Return values
string —add()
Add a new record.
    public
                add(mixed $data, array<string|int, mixed> $config) : mixed
    
        Parameters
- $data : mixed
 - $config : array<string|int, mixed>
 
Return values
mixed —all()
Retrieve all non-deleted model-data.
    public
                all(array<string|int, mixed> $config) : Collection
    
        Parameters
- $config : array<string|int, mixed>
 
Return values
Collection —delete()
Instead of deleting set the flag.
    public
                delete(array<string|int, mixed> $data, array<string|int, mixed> $config) : mixed
    
        Parameters
- $data : array<string|int, mixed>
 - $config : array<string|int, mixed>
 
Return values
mixed —get()
Retrieve non-deleted model-data by id.
    public
                get(mixed $id, mixed $config) : mixed
    
        Parameters
- $id : mixed
 - $config : mixed
 
Return values
mixed —data
register()
Remove the "is_deleted" property from the mapping.
    public
                register(ModelConfig $config) : mixed
    
        Parameters
- $config : ModelConfig
 
Return values
mixed —related()
Retrieve all related model-data.
    public
                related(mixed $config, mixed $reference, mixed $id) : Traversable|array<string|int, mixed>
    
        Parameters
- $config : mixed
 - $reference : mixed
 - $id : mixed
 - 
                    
The ID of the container instance.
 
Return values
Traversable|array<string|int, mixed> —renameModel()
Rename a model and remap the relations to the new name.
    public
                renameModel(string $from, string $to) : mixed
    
        Parameters
- $from : string
 - 
                    
Current name
 - $to : string
 - 
                    
The new name
 
Return values
mixed —renameProperty()
Rename a property and remap the relations to the new name.
    public
                renameProperty(string $model, string $from, string $to) : mixed
    
        Parameters
- $model : string
 - 
                    
The modelname
 - $from : string
 - 
                    
The current propertyname
 - $to : string
 - 
                    
The new propertyname
 
Return values
mixed —skipProperty()
Remove a property.
    public
                skipProperty(string $model, string $property) : mixed
    
        Parameters
- $model : string
 - 
                    
The modelname
 - $property : string
 - 
                    
The current propertyname
 
Return values
mixed —update()
Update an existing record.
    public
                update(mixed $new, mixed $old, array<string|int, mixed> $config) : mixed
    
        Parameters
- $new : mixed
 - $old : mixed
 - $config : array<string|int, mixed>
 
Return values
mixed —updated data