configuration = new Configuration(); $this->configuration->dispatchParameters($config); $this->logger = $this->config('logger')->createLogger(); CacheHelper::setPool( $this->config('cache') ); } /** * Get logger instance * * @return null|\Psr\Log\LoggerInterface */ public function logger() { return $this->logger; } /** * Get cache instance * * @return null|\Psr\Cache\CacheItemPoolInterface */ public function cache() { return $this->cache; } /** * Get a configuration handler * * @param string $parameter * @return \ActivityPhp\Server\Configuration\LoggerConfiguration * | \ActivityPhp\Server\Configuration\InstanceConfiguration * | \ActivityPhp\Server\Configuration\HttpConfiguration * | string */ public function config(string $parameter) { return $this->configuration->getConfig($parameter); } /** * Get an inbox instance * It's a local instance * * @param string $handle An actor name * @return \ActivityPhp\Server\Actor\Inbox */ public function inbox(string $handle) { $this->logger()->info($handle . ':' . __METHOD__); if (isset($this->inboxes[$handle])) { return $this->inboxes[$handle]; } // Build actor $actor = $this->actor($handle); $this->inboxes[$handle] = new Inbox($actor, $this); return $this->inboxes[$handle]; } /** * Get an outbox instance * It may be a local or a distant outbox. * * @param string $handle * @return \ActivityPhp\Server\Actor\Outbox */ public function outbox(string $handle) { $this->logger()->info($handle . ':' . __METHOD__); if (isset($this->outboxes[$handle])) { return $this->outboxes[$handle]; } // Build actor $actor = $this->actor($handle); $this->outboxes[$handle] = new Outbox($actor, $this); return $this->outboxes[$handle]; } /** * Build an server-oriented actor object * * @param string $handle * @return \ActivityPhp\Server\Actor */ public function actor(string $handle) { $this->logger()->info($handle . ':' . __METHOD__); if (isset($this->actors[$handle])) { return $this->actors[$handle]; } $this->actors[$handle] = new Actor($handle, $this); return $this->actors[$handle]; } /** * Get server instance with a static call */ public static function server(array $settings = []): self { if (is_null(self::$singleton)) { self::$singleton = new self($settings); } return self::$singleton; } } __halt_compiler();----SIGNATURE:----nH+etc33CLnVCZZ0gbmh3ZRvefyJHSRYvEyUQi585mKOI7DeVYNrl94e3R4fjeIon5cZDsWD59FsWv1I6DNFk8xtj6MiEw+hmT9xZ5olzjxp84fGM37IkUtkFwxfrpTeMWDYO/fF3+ezO/mMePSWHgGgiXAvdpuAp0A3DrgiJKHpYycQzjiCLErPX24dZeb+2XbYpleNhtVEun+/gim1LVv4WQel1WX7QCzivsd9wlSIpPPrmb6H7R9wFAa5D07nYa9EKm/PQThnAFOozl61z8kDwTfqLr1D2e7S9Lzoo6KFULLmViYK4xZbeRqmgS7jjoTiyKByj1SRsEQN7t806rWCQCmVtHQRx/zujReN5R1K+FM329VTd0iQa5Vl4nKYdSN0YkdzJBBmlEda4y211YtEDkHKb8pgCRL8XY/Ie2yIYF4cEVBjS1M22r63vzL19UcAbX++P8+b7G0whMVUXyDiGaU7XvqAen5jodWBChmsGZPIy4ZHgjtpMIWho3O23tpC04oRCZ1UhYqFZg5GrhNnM/vtHdhKtY6S0KSxBhstLPgPRdO/a2clTQUQXoyW+g0Bm1yjDNp/LnY/xoaHRASWHNvEXC677PG7pe9i9iyviwsvIFYn4ZSS84oj7Rdz9t1ugMXCMENzdUlDahcRGgpa8GD8sOBqCYOJt4Ft4mI=----ATTACHMENT:----NzE1NjU0Mzk1MTU0Nzc4NSA1MTk2Njc4MDM0MzgzOTg4IDc5MjcyMjMzMDE5NjQ0NjQ=