1 | <?php |
||
8 | class Password extends Field { |
||
9 | |||
10 | public $value = ''; |
||
11 | 3 | ||
12 | public function hash($value) |
||
20 | |||
21 | public function needsRehash($hash = null) |
||
27 | 1 | ||
28 | public function matches($hash) |
||
38 | 5 | ||
39 | public function getValue() |
||
40 | 5 | { |
|
41 | return $this->value; |
||
42 | } |
||
43 | 3 | ||
44 | public function getButtonName() |
||
45 | 3 | { |
|
46 | // |
||
47 | } |
||
48 | 10 | ||
49 | public function renderWith() |
||
50 | 10 | { |
|
51 | // |
||
52 | } |
||
53 | 10 | ||
54 | public function setValueFromDefault() |
||
55 | { |
||
56 | 10 | // |
|
57 | } |
||
58 | 1 | ||
59 | public function setValueFromModel($model) |
||
60 | 1 | { |
|
61 | 1 | if (property_exists($model, $this->name)) $this->value = $model->{$this->name}; |
|
62 | } |
||
63 | 3 | ||
64 | public function setValueFromRequest($request) |
||
65 | 3 | { |
|
66 | 3 | $this->value = $this->hash($request->get($this->name)); |
|
67 | } |
||
68 | 4 | ||
69 | public function fillModelWithValue($model) |
||
70 | 4 | { |
|
71 | 4 | if (property_exists($model, $this->name)) $model->{$this->name} = $this->value; |
|
72 | } |
||
73 | 1 | ||
74 | public function validateRequired() |
||
78 | |||
79 | } |