/** * */ public function init(Controller $controller) { $this->ctrl = $controller; // register route /jmap to controller $controller->routes['jmap'] = [$this, 'process']; // register myself as provider for some JMAP commands $this->methodmap['getAccounts'] = [$this]; $app = App::getInstance(); $config = $app->get('Config'); // load providers from config foreach ((array) $config->get('jmap.providers') as $providerclass) { try { $provider = $app->get($providerclass); if ($provider instanceof JmapProvider) { $this->addProvider($provider); } else { throw new \RuntimeException("The provider class {$providerclass} doesn't implement Roundcube\\JMAP\\Provider"); } } catch (\RuntimeException $e) { // TODO: log this } } // allow plugins to register JMAP providers $controller->emit('jmap:init', [$this]); }
public function getRouteMatch($path) { return parent::getRouteMatch($path); }