Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Routing / RouteWrapperInterface.php
diff --git a/web/modules/contrib/drupalmoduleupgrader/src/Routing/RouteWrapperInterface.php b/web/modules/contrib/drupalmoduleupgrader/src/Routing/RouteWrapperInterface.php
new file mode 100644 (file)
index 0000000..50e83be
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+
+namespace Drupal\drupalmoduleupgrader\Routing;
+
+/**
+ * Common interface implemented by classes which wrap around Drupal 7 or
+ * Drupal 8 routes.
+ */
+interface RouteWrapperInterface {
+
+  /**
+   * Returns an identifier for this route.
+   *
+   * @return string
+   */
+  public function getIdentifier();
+
+  /**
+   * Returns a PathUtilityInterface implementation for the route.
+   *
+   * @return \Drupal\drupalmoduleupgrader\Utility\Path\PathUtilityInterface
+   */
+  public function getPath();
+
+  /**
+   * Returns if this route has a parent.
+   *
+   * @return boolean
+   */
+  public function hasParent();
+
+  /**
+   * Gets the parent route, if there is one. The parent should also be wrapped.
+   *
+   * @return static|NULL
+   */
+  public function getParent();
+
+  /**
+   * Returns the original, unwrapped route.
+   *
+   * @return mixed
+   */
+  public function unwrap();
+
+  /**
+   * React to the router (i.e., the collection of routes defined by the
+   * module) being completely built.
+   *
+   * @param RouterBuiltEvent $event
+   *  The event object.
+   */
+  public function onRouterBuilt(RouterBuiltEvent $event);
+
+}