get('schema'))->execute(); } } /** * Activate after install. * * @param DatabasePool $dbPool Database instance * @param ApplicationInfo $info App info * * @return void * * @since 1.0.0 */ protected static function activate(DatabasePool $dbPool, ApplicationInfo $info) : void { if (($path = \realpath(static::PATH)) === false) { return; // @codeCoverageIgnore } $classPath = \substr($path . '/Status', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); // @var class-string $class $class = \str_replace('/', '\\', $classPath); if (!Autoloader::exists($class)) { throw new \UnexpectedValueException($class); // @codeCoverageIgnore } $class::activate($dbPool, $info); } /** * Re-init app. * * @param ApplicationInfo $info App info * * @return void * * @since 1.0.0 */ public static function reInit(ApplicationInfo $info) : void { if (($path = \realpath(static::PATH)) === false) { return; // @codeCoverageIgnore } $classPath = \substr($path . '/Status', (int) \strlen((string) \realpath(__DIR__ . '/../../'))); // @var class-string $class $class = \str_replace('/', '\\', $classPath); if (!Autoloader::exists($class)) { throw new \UnexpectedValueException($class); // @codeCoverageIgnore } $class::clearRoutes(); $class::clearHooks(); $class::activateRoutes($info); $class::activateHooks($info); } }