ReWork Notification Model/Module/Object/Repository/Factory
- Introduce Repository for interaction with "notify" table - Introduce Factory for read-only notification objects (they're just loosely based on notification the table!) - Introduce Objects for type-safe usage at the presentation layer - Reworked Model, which is now fully based on the notify table, including generated fields (cache, ..)
This commit is contained in:
20
src/DI.php
20
src/DI.php
@@ -244,6 +244,22 @@ abstract class DI
|
||||
return self::$dice->create(Factory\Mastodon\Relationship::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Friendica\Factory\Notification\NotificationFactory
|
||||
*/
|
||||
public static function factNotification()
|
||||
{
|
||||
return self::$dice->create(Factory\Notification\NotificationFactory::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Friendica\Factory\Notification\IntroductionFactory
|
||||
*/
|
||||
public static function factNotIntro()
|
||||
{
|
||||
return self::$dice->create(Factory\Notification\IntroductionFactory::class);
|
||||
}
|
||||
|
||||
//
|
||||
// "Model" namespace instances
|
||||
//
|
||||
@@ -257,11 +273,11 @@ abstract class DI
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Model\Notification
|
||||
* @return Repository\Notification
|
||||
*/
|
||||
public static function notification()
|
||||
{
|
||||
return self::$dice->create(Model\Notification::class);
|
||||
return self::$dice->create(Repository\Notification::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user