src/app/Balloon.App.Convert/AttributeDecorator.php 1 location
|
@@ 54-64 (lines=11) @@
|
51 |
|
/** |
52 |
|
* Decorate attributes. |
53 |
|
*/ |
54 |
|
public function decorate(array $slave, array $attributes = []): array |
55 |
|
{ |
56 |
|
$requested = $attributes; |
57 |
|
$attrs = $this->getAttributes($slave); |
58 |
|
|
59 |
|
if (0 === count($requested)) { |
60 |
|
return $this->translateAttributes($slave, $attrs); |
61 |
|
} |
62 |
|
|
63 |
|
return $this->translateAttributes($slave, array_intersect_key($attrs, array_flip($requested))); |
64 |
|
} |
65 |
|
|
66 |
|
/** |
67 |
|
* Add decorator. |
src/app/Balloon.App.Notification/AttributeDecorator.php 1 location
|
@@ 64-74 (lines=11) @@
|
61 |
|
/** |
62 |
|
* Decorate attributes. |
63 |
|
*/ |
64 |
|
public function decorate(array $message, array $attributes = []): array |
65 |
|
{ |
66 |
|
$requested = $attributes; |
67 |
|
$attrs = $this->getAttributes($message); |
68 |
|
|
69 |
|
if (0 === count($requested)) { |
70 |
|
return $this->translateAttributes($message, $attrs); |
71 |
|
} |
72 |
|
|
73 |
|
return $this->translateAttributes($message, array_intersect_key($attrs, array_flip($requested))); |
74 |
|
} |
75 |
|
|
76 |
|
/** |
77 |
|
* Add decorator. |