PHP Class Flarum\Event\GetApiRelationship

This event is fired when a relationship is to be included on an API document. If a handler wishes to control the given relationship, then it should return an instance of Tobscure\JsonApi\Relationship\BuilderInterface.
See also: AbstractSerializer::hasOne()
See also: AbstractSerializer::hasMany()
See also: https://github.com/tobscure/json-api
Afficher le fichier Open project: flarum/core Class Usage Examples

Méthodes publiques

Свойство Type Description
$model mixed
$relationship string
$serializer Flarum\Api\Serializer\AbstractSerializer

Méthodes publiques

Méthode Description
__construct ( AbstractSerializer $serializer, string $relationship, mixed $model )
isRelationship ( string $serializer, string $relationship ) : boolean

Method Details

__construct() public méthode

public __construct ( AbstractSerializer $serializer, string $relationship, mixed $model )
$serializer Flarum\Api\Serializer\AbstractSerializer
$relationship string
$model mixed

isRelationship() public méthode

public isRelationship ( string $serializer, string $relationship ) : boolean
$serializer string
$relationship string
Résultat boolean

Property Details

$model public_oe property

public mixed $model
Résultat mixed

$relationship public_oe property

public string $relationship
Résultat string

$serializer public_oe property

public AbstractSerializer,Flarum\Api\Serializer $serializer
Résultat Flarum\Api\Serializer\AbstractSerializer