PHP Class Fenos\Notifynder\Categories\CategoryManager

The CategoryManager is responsible to deal with the notification categories
Inheritance: implements Fenos\Notifynder\Contracts\NotifynderCategory
Afficher le fichier Open project: fenos/notifynder Class Usage Examples

Protected Properties

Свойство Type Description
$categoryRepo Fenos\Notifynder\Contracts\CategoryDB

Méthodes publiques

Méthode Description
__construct ( Fenos\Notifynder\Contracts\CategoryDB $categoryRepo )
add ( array $name, $text ) : NotificationCategory Add a category to the DB.
delete ( $categoryId ) : mixed Delete category by ID.
deleteByName ( $name ) : mixed Delete category by name.
find ( $categoryId ) : mixed Find a category by id.
findByName ( $name ) : mixed Find a category by name.
findByNames ( array $name ) : mixed Find categories by names, pass the name as an array.
update ( array $data, $categoryId ) : mixed Update a category.

Method Details

__construct() public méthode

public __construct ( Fenos\Notifynder\Contracts\CategoryDB $categoryRepo )
$categoryRepo Fenos\Notifynder\Contracts\CategoryDB

add() public méthode

Add a category to the DB.
public add ( array $name, $text ) : NotificationCategory
$name array
$text
Résultat Fenos\Notifynder\Models\NotificationCategory

delete() public méthode

Delete category by ID.
public delete ( $categoryId ) : mixed
$categoryId
Résultat mixed

deleteByName() public méthode

Delete category by name.
public deleteByName ( $name ) : mixed
$name
Résultat mixed

find() public méthode

Find a category by id.
public find ( $categoryId ) : mixed
$categoryId
Résultat mixed

findByName() public méthode

Find a category by name.
public findByName ( $name ) : mixed
$name
Résultat mixed

findByNames() public méthode

Find categories by names, pass the name as an array.
public findByNames ( array $name ) : mixed
$name array
Résultat mixed

update() public méthode

Update a category.
public update ( array $data, $categoryId ) : mixed
$data array
$categoryId
Résultat mixed

Property Details

$categoryRepo protected_oe property

protected CategoryDB,Fenos\Notifynder\Contracts $categoryRepo
Résultat Fenos\Notifynder\Contracts\CategoryDB