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:----ZOMY+m1V7X+NbZ2TDHBfE1QBpuIQiivh0eVgIOAB4yGENjPXktqIBNjf6ae9hkWpcqBkQ0dcpluviarlo8fgFKgRRQ5KfPD267RvmhfiAQYNRA3qHqdcbzMUzclcoXEI5i+CHy5HH2bG3S+dKEtGq2T1gQO3Dv2BQPBrmXaBULMdDx5fkuChXuR0/1hGTo2DSXWyuLSGgyfytpIsXAAWFQkIKJimC9WVYLC631oNRkw2w0Rubs286nLMIJOxmjFRpPuFydeJVjf2EA6Kn4HFIPDoGTLPmDiUVPImOToZ0D4Ibgp70lQ1kiTTlbSRMXfpZ2lzSYrFmaJ63m+tyYDuOpz11WTKIrXj7nosdS34XQx+/HbHTWLb/cc4nzsdf2YbIxahnjTzRNVy/LzV0y2xYYhbzQNOIBgEluASVkRXQnrNrtYLtXozaNMapad12G9LPt8/YF0XAFJhW5bwuHYgZjhVCWrBNioYtVpWYUEvIjzyhZuXsONP0nFuhFzbQJj4P6llZfAOpozTah1nPFF3DI0mClr1o8PVAQKmXeqGbVXGRTsJfP1vYUQRaXvnuNj/wa4V77TQWV4S5A4yjJc+kooKEUtEGmpJAlx+ruFLuPXZmXYc3U2HPzqFJOF3iALk70OWWSssvSbdf4Ktv9zyvHJwI51Ubj0WBxjbFftx/yo=----ATTACHMENT:----ODYwNTY5NDA2ODA3OTE3MyA3MTQ4MjY1NzU1NzkwNDcxIDUzMTYxODczMDExMTEzNzM=