PreferenceInterface
last analyzed

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
field() 0 1 ?
getKey() 0 1 ?
setKey() 0 1 ?
getUser() 0 1 ?
setUser() 0 1 ?
getValue() 0 1 ?
setValue() 0 1 ?
getFieldTypePresenter() 0 1 ?
1
<?php namespace Anomaly\PreferencesModule\Preference\Contract;
2
3
use Anomaly\Streams\Platform\Addon\FieldType\FieldType;
4
use Anomaly\Streams\Platform\Addon\FieldType\FieldTypePresenter;
5
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
6
use Anomaly\UsersModule\User\Contract\UserInterface;
7
8
/**
9
 * Interface PreferenceInterface
10
 *
11
 * @link          http://pyrocms.com/
12
 * @author        PyroCMS, Inc. <[email protected]>
13
 * @author        Ryan Thompson <[email protected]>
14
 */
15
interface PreferenceInterface extends EntryInterface
16
{
17
18
    /**
19
     * Return the value field.
20
     *
21
     * @return FieldType
22
     */
23
    public function field();
24
25
    /**
26
     * Get the key.
27
     *
28
     * @return string
29
     */
30
    public function getKey();
31
32
    /**
33
     * Set the key.
34
     *
35
     * @param $key
36
     * @return $this
37
     */
38
    public function setKey($key);
39
40
    /**
41
     * Get the user.
42
     *
43
     * @return UserInterface
44
     */
45
    public function getUser();
46
47
    /**
48
     * Set the user.
49
     *
50
     * @param  UserInterface $user
51
     * @return $this
52
     */
53
    public function setUser(UserInterface $user);
54
55
    /**
56
     * Get the value.
57
     *
58
     * @return mixed
59
     */
60
    public function getValue();
61
62
    /**
63
     * Set the value.
64
     *
65
     * @param $value
66
     * @return $this
67
     */
68
    public function setValue($value);
69
70
    /**
71
     * Get the field type's presenter
72
     * for a given field slug.
73
     *
74
     * We're overriding this to catch
75
     * the "value" key.
76
     *
77
     * @param $fieldSlug
78
     * @return FieldTypePresenter
79
     */
80
    public function getFieldTypePresenter($fieldSlug);
81
}
82