PHP Class Flarum\Api\Serializer\NotificationSerializer

Inheritance: extends AbstractSerializer
Mostra file Open project: flarum/core Class Usage Examples

Protected Properties

Property Type Description
$subjectSerializers array A map of notification types (key) to the serializer that should be used to output the notification's subject (value).
$type

Public Methods

Method Description
setSubjectSerializer ( $type, $serializer )

Protected Methods

Method Description
getDefaultAttributes ( Notification $notification )
sender ( $notification ) : Relationship
subject ( $notification ) : Relationship
user ( $notification ) : Relationship

Method Details

getDefaultAttributes() protected method

protected getDefaultAttributes ( Notification $notification )
$notification Flarum\Core\Notification

sender() protected method

protected sender ( $notification ) : Relationship
return Tobscure\JsonApi\Relationship

setSubjectSerializer() public static method

public static setSubjectSerializer ( $type, $serializer )
$type
$serializer

subject() protected method

protected subject ( $notification ) : Relationship
return Tobscure\JsonApi\Relationship

user() protected method

protected user ( $notification ) : Relationship
return Tobscure\JsonApi\Relationship

Property Details

$subjectSerializers protected_oe static_oe property

A map of notification types (key) to the serializer that should be used to output the notification's subject (value).
protected static array $subjectSerializers
return array

$type protected_oe property

protected $type