Bristol SU Support Package
Public Member Functions | List of all members
BristolSU\Support\Logic\LogicRepository Class Reference
Inheritance diagram for BristolSU\Support\Logic\LogicRepository:
Inheritance graph
[legend]
Collaboration diagram for BristolSU\Support\Logic\LogicRepository:
Collaboration graph
[legend]

Public Member Functions

 create (array $attributes)
 
 all ()
 
 getById (int $id)
 
 update (int $id, array $attributes)
 
 delete (int $id)
 

Detailed Description

Handles saving and retrieving logic group information

Definition at line 13 of file LogicRepository.php.

Member Function Documentation

◆ all()

BristolSU\Support\Logic\LogicRepository::all ( )

Get all logic groups

Returns
Logic[]

Implements BristolSU\Support\Logic\Contracts\LogicRepository.

Definition at line 38 of file LogicRepository.php.

◆ create()

BristolSU\Support\Logic\LogicRepository::create ( array  $attributes)

Create a logic group in the database

The attributes should be a name and a description [ 'name' => 'Name of the logic group', 'description' => 'Description of the logic group' ]

Parameters
array$attributesAttributes for the logic group
Returns
Logic Created logic group

Implements BristolSU\Support\Logic\Contracts\LogicRepository.

Definition at line 28 of file LogicRepository.php.

◆ delete()

BristolSU\Support\Logic\LogicRepository::delete ( int  $id)

Delete a logic group

Parameters
int$id
Exceptions
ModelNotFoundException

Implements BristolSU\Support\Logic\Contracts\LogicRepository.

Definition at line 78 of file LogicRepository.php.

References BristolSU\Support\Logic\LogicRepository\getById().

◆ getById()

BristolSU\Support\Logic\LogicRepository::getById ( int  $id)

Get a logic group by ID

Parameters
int$id
Returns
Logic
Exceptions
ModelNotFoundException

Implements BristolSU\Support\Logic\Contracts\LogicRepository.

Definition at line 50 of file LogicRepository.php.

Referenced by BristolSU\Support\Logic\LogicRepository\delete(), and BristolSU\Support\Logic\LogicRepository\update().

◆ update()

BristolSU\Support\Logic\LogicRepository::update ( int  $id,
array  $attributes 
)

Update a logic group

Parameters
int$idID of the logic group
array$attributes
Returns
Logic
Exceptions
ModelNotFoundException

Implements BristolSU\Support\Logic\Contracts\LogicRepository.

Definition at line 63 of file LogicRepository.php.

References BristolSU\Support\Logic\LogicRepository\getById().


The documentation for this class was generated from the following file: