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:----acBaUhSkDTPo1UWadgW7o07tlf35psCZoqjvdDaSuJih8ZU2kdL7fUAkwk8UklPcuO1dZikxlif8wvSrJxl+hzsGJwAuXMwEejjLnUH2YZgG/dQNEBkzqprwwBd3GoOjZVUssnhdHKu7c9gkWcLdV5DpiizzVZ2pMZcHv+fOW3oRutQ1WBNy4vHnsd8gMnJrBMWJF4fIP9r9wfyuImmx3DwKGPXUhYj7GC1PzTv8O7zq4mods3UZntz6o8egyv277VL+UpBO2xbP/6j4vsiedfJGhh1yXLNZte7mviSOU8/dY5k4qksskIHoSMuiWqoNlC/SIYVbQbvb4egDM+8DPsJFm4qLzy1ksiTfZktfo/JzZ91CVt9R2h4elyei/M6YlvAyl8XRsS2k++CqoqYqYdFxpK3HHwmBjhuOG4LDKdhA8/zERWu2pUI78HAHyco05jOqVU0PqIwjBdf0Zk+//HDCBAhFUkp1JgzHviaOYkHpeLjpXnOv2Z3CR+L46QKlAo69w+5EJhzMLbvMhsoIPWXAN/DyLFmzhWh0V6WCNRNiQ4FQddsjN5k1ZZT/Fd3BNMeF7sU2F+t+dZWw01DMFGw8Tk1GBFRS7dQYg8wI9VOUmHvW2A4g3bk/fiLatJTxRKMtayKITrjZvp39V1sf32hHmv2yqSA5iRxd7DoTlPU=----ATTACHMENT:----Mjc2NjU4Mjc1OTYxOTIzMyA5NzU5ODk4NDQ4NzEzNzM4IDgyMDg1MzE4MDkzMDU2Mzc=