Breadcrumbs
last analyzed

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 60
ccs 0
cts 0
cp 0
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
setSupported() 0 1 ?
setTemplate() 0 1 ?
register() 0 1 ?
render() 0 1 ?
generate() 0 1 ?
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\Breadcrumbs\Contracts;
6
7
use Closure;
8
9
/**
10
 * Interface  Breadcrumbs
11
 *
12
 * @author    ARCANEDEV <[email protected]>
13
 */
14
interface Breadcrumbs
15
{
16
    /* -----------------------------------------------------------------
17
     |  Getters & Setters
18
     | -----------------------------------------------------------------
19
     */
20
21
    /**
22
     * Set the supported template.
23
     *
24
     * @param  array  $supported
25
     *
26
     * @return self
27
     */
28
    public function setSupported(array $supported);
29
30
    /**
31
     * Set default template view.
32
     *
33
     * @param  string  $template
34
     *
35
     * @return self
36
     */
37
    public function setTemplate($template);
38
39
    /* -----------------------------------------------------------------
40
     |  Main Methods
41
     | -----------------------------------------------------------------
42
     */
43
44
    /**
45
     * Register a breadcrumb domain.
46
     *
47
     * @param  string    $name
48
     * @param  \Closure  $callback
49
     *
50
     * @return self
51
     */
52
    public function register($name, Closure $callback);
53
54
    /**
55
     * Render breadcrumbs items.
56
     *
57
     * @param  string|null  $name
58
     * @param  array        $params
59
     *
60
     * @return \Illuminate\Support\HtmlString
61
     */
62
    public function render($name = null, ...$params);
63
64
    /**
65
     * Generate the breadcrumbs.
66
     *
67
     * @param  string  $name
68
     * @param  array   $params
69
     *
70
     * @return array
71
     */
72
    public function generate($name, ...$params);
73
}
74