Repository
last analyzed

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
scan() 0 1 ?
register() 0 1 ?
all() 0 1 ?
current() 0 1 ?
findOrFail() 0 1 ?
uninstall() 0 1 ?
getDirectoryPath() 0 1 ?
getBasePath() 0 1 ?
1
<?php
2
3
namespace Yajra\CMS\Themes\Repositories;
4
5
interface Repository
6
{
7
    /**
8
     * Scan themes directory.
9
     */
10
    public function scan();
11
12
    /**
13
     * Register theme.json file.
14
     *
15
     * @param \SplFileInfo $file
16
     * @throws \Exception
17
     */
18
    public function register($file);
19
20
    /**
21
     * Get all themes.
22
     *
23
     * @return \Illuminate\Support\Collection
24
     */
25
    public function all();
26
27
    /**
28
     * Get current frontend theme.
29
     *
30
     * @return \Yajra\CMS\Themes\Theme
31
     * @throws \Yajra\CMS\Themes\Exceptions\ThemeNotFoundException
32
     */
33
    public function current();
34
35
    /**
36
     * Find or fail a theme.
37
     *
38
     * @param string $theme
39
     * @param string $type
40
     * @return \Yajra\CMS\Themes\Theme
41
     * @throws \Yajra\CMS\Themes\Exceptions\ThemeNotFoundException
42
     */
43
    public function findOrFail($theme, $type = 'frontend');
44
45
    /**
46
     * Uninstall a theme.
47
     *
48
     * @param string $theme
49
     * @return bool
50
     */
51
    public function uninstall($theme);
52
53
    /**
54
     * Get directory path of the theme.
55
     *
56
     * @param string $theme
57
     * @return string
58
     */
59
    public function getDirectoryPath($theme);
60
61
    /**
62
     * Get themes base path.
63
     *
64
     * @return string
65
     */
66
    public function getBasePath();
67
}
68