diff core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 129ea1e6d783
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/lib/Drupal/Core/Routing/AccessAwareRouterInterface.php	Wed Nov 29 16:09:58 2017 +0000
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Core\Routing;
+
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
+use Symfony\Component\Routing\RouterInterface;
+
+/**
+ * Interface for a router class for Drupal with access check and upcasting.
+ */
+interface AccessAwareRouterInterface extends RouterInterface, RequestMatcherInterface {
+
+  /**
+   * Attribute name of the access result for the request..
+   */
+  const ACCESS_RESULT = '_access_result';
+
+  /**
+   * {@inheritdoc}
+   *
+   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
+   *   Thrown when access checking failed.
+   */
+  public function matchRequest(Request $request);
+
+
+  /**
+   * {@inheritdoc}
+   *
+   * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
+   *   Thrown when $access_check is enabled and access checking failed.
+   */
+  public function match($pathinfo);
+
+}