Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\Core\Path;
|
Chris@0
|
4
|
Chris@0
|
5 /**
|
Chris@0
|
6 * Find an alias for a path and vice versa.
|
Chris@0
|
7 *
|
Chris@0
|
8 * @see \Drupal\Core\Path\AliasStorageInterface
|
Chris@0
|
9 */
|
Chris@0
|
10 interface AliasManagerInterface {
|
Chris@0
|
11
|
Chris@0
|
12 /**
|
Chris@0
|
13 * Given the alias, return the path it represents.
|
Chris@0
|
14 *
|
Chris@0
|
15 * @param string $alias
|
Chris@0
|
16 * An alias.
|
Chris@0
|
17 * @param string $langcode
|
Chris@0
|
18 * An optional language code to look up the path in.
|
Chris@0
|
19 *
|
Chris@0
|
20 * @return string
|
Chris@0
|
21 * The path represented by alias, or the alias if no path was found.
|
Chris@0
|
22 *
|
Chris@0
|
23 * @throws \InvalidArgumentException
|
Chris@0
|
24 * Thrown when the path does not start with a slash.
|
Chris@0
|
25 */
|
Chris@0
|
26 public function getPathByAlias($alias, $langcode = NULL);
|
Chris@0
|
27
|
Chris@0
|
28 /**
|
Chris@0
|
29 * Given a path, return the alias.
|
Chris@0
|
30 *
|
Chris@0
|
31 * @param string $path
|
Chris@0
|
32 * A path.
|
Chris@0
|
33 * @param string $langcode
|
Chris@0
|
34 * An optional language code to look up the path in.
|
Chris@0
|
35 *
|
Chris@0
|
36 * @return string
|
Chris@0
|
37 * An alias that represents the path, or path if no alias was found.
|
Chris@0
|
38 *
|
Chris@0
|
39 * @throws \InvalidArgumentException
|
Chris@0
|
40 * Thrown when the path does not start with a slash.
|
Chris@0
|
41 */
|
Chris@0
|
42 public function getAliasByPath($path, $langcode = NULL);
|
Chris@0
|
43
|
Chris@0
|
44 /**
|
Chris@0
|
45 * Clear internal caches in alias manager.
|
Chris@0
|
46 *
|
Chris@0
|
47 * @param $source
|
Chris@0
|
48 * Source path of the alias that is being inserted/updated. Can be omitted
|
Chris@0
|
49 * if entire cache needs to be flushed.
|
Chris@0
|
50 */
|
Chris@0
|
51 public function cacheClear($source = NULL);
|
Chris@0
|
52
|
Chris@0
|
53 }
|