Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented implementation required for extra data. #11

Open
hakanersu opened this issue Jun 12, 2020 · 0 comments
Open

Undocumented implementation required for extra data. #11

hakanersu opened this issue Jun 12, 2020 · 0 comments

Comments

@hakanersu
Copy link
Contributor

In ActivityObject interface getExtraData method which i thought enough for including extra data to ActivityStream but it seems ReturnsExtraData implementation required for adding extra data. Is it necessary to implement another interface for extra data?

public static function createFromModel(Model $model, $extraData = []): ActivityObject
{
if ($model instanceof ReturnsExtraData) {
$extraData = $model->getExtraData();
}
return new static(get_class($model), $model->getKey(), $extraData);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant