SiteAliasManagerInterface
last analyzed

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 56
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
searchLocations() 0 1 ?
get() 0 1 ?
getSelf() 0 1 ?
getAlias() 0 1 ?
getMultiple() 0 1 ?
listAllFilePaths() 0 1 ?
1
<?php
2
namespace Consolidation\SiteAlias;
3
4
/**
5
 * Site Alias manager
6
 */
7
interface SiteAliasManagerInterface
8
{
9
    /**
10
     * Return all of the paths where alias files may be found.
11
     * @return string[]
12
     */
13
    public function searchLocations();
14
15
    /**
16
     * Get an alias record by name, or convert a site specification
17
     * into an alias record via the site alias spec parser. If a
18
     * simple alias name is provided (e.g. '@alias'), it is interpreted
19
     * as a sitename, and the default environment for that site is returned.
20
     *
21
     * @param string $name Alias name or site specification
22
     *
23
     * @return SiteAlias|false
24
     */
25
    public function get($name);
26
27
    /**
28
     * Get the '@self' alias record.
29
     *
30
     * @return SiteAlias
31
     */
32
    public function getSelf();
33
34
    /**
35
     * Get an alias record from a name. Does not accept site specifications.
36
     *
37
     * @param string $aliasName alias name
38
     *
39
     * @return SiteAlias
40
     */
41
    public function getAlias($aliasName);
42
43
    /**
44
     * Given a simple alias name, e.g. '@alias', returns all of the
45
     * environments in the specified site.
46
     *
47
     * If the provided name is a site specification et. al.,
48
     * then this method will return 'false'.
49
     *
50
     * @param string $name Alias name
51
     * @return SiteAlias[]|false
52
     */
53
    public function getMultiple($name = '');
54
55
    /**
56
     * Return the paths to all alias files in all search locations known
57
     * to the alias manager.
58
     *
59
     * @return string[]
60
     */
61
    public function listAllFilePaths($location = '');
62
}
63