Register handlers with module
This commit is contained in:
parent
6e4ebe5734
commit
c1598dafbf
@ -3,6 +3,7 @@ namespace ActivityPub;
|
||||
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use ActivityPub\Activities\CreateHandler;
|
||||
use ActivityPub\Activities\NonActivityHandler;
|
||||
use ActivityPub\Activities\ValidationHandler;
|
||||
use ActivityPub\Auth\AuthListener;
|
||||
@ -93,6 +94,7 @@ class ActivityPub
|
||||
{
|
||||
$dispatcher->addSubscriber( $this->module->get( NonActivityHandler::class ) );
|
||||
$dispatcher->addSubscriber( $this->module->get( ValidationHandler::class ) );
|
||||
$dispatcher->addSubscriber( $this->module->get( CreateHandler::class );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
namespace ActivityPub\Config;
|
||||
|
||||
use ActivityPub\Activities\CreateHandler;
|
||||
use ActivityPub\Activities\NonActivityHandler;
|
||||
use ActivityPub\Activities\ValidationHandler;
|
||||
use ActivityPub\Auth\AuthListener;
|
||||
use ActivityPub\Auth\AuthService;
|
||||
use ActivityPub\Auth\SignatureListener;
|
||||
@ -104,6 +107,13 @@ class ActivityPubModule
|
||||
$this->injector->register( Router::class, Router::class )
|
||||
->addArgument( new Reference( GetController::class ) )
|
||||
->addArgument( new Reference( PostController::class ) );
|
||||
|
||||
$this->injector->register( NonActivityHandler::class, NonActivityHandler::class );
|
||||
$this->injector->register( ValidationHandler::class, ValidationHandler::class );
|
||||
$this->injector->register( CreateHandler::class, CreateHandler::class )
|
||||
->addArgument( new Reference( ObjectsService::class ) )
|
||||
->addArgument( new Reference( IdProvider::class ) )
|
||||
->addArgument( new Reference( CollectionsService::class ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user