ads all registered routes if their conditionals are met. * * @return void */ public function load_routes() { foreach ( $this->routes as $class ) { if ( ! $this->conditionals_are_met( $class ) ) { continue; } $this->container->get( $class )->register_routes(); } } /** * Checks if all conditionals of a given integration are met. * * @param Loadable_Interface $class The class name of the integration. * * @return bool Whether or not all conditionals of the integration are met. */ protected function conditionals_are_met( $class ) { $conditionals = $class::get_conditionals(); foreach ( $conditionals as $conditional ) { if ( ! $this->container->get( $conditional )->is_met() ) { return false; } } return true; } }