Skip to content

Commit 9d77646

Browse files
pluk77fabpot
authored andcommitted
Add getters and setters for attributes property
This addition prevents the need to overload the $attributes property when extending this class to get access to all attributes at once. Currently, there is no way to get all attributes out of the passport without knowing the names of each attribute. hslavich/OneloginSamlBundle#181 (comment)
1 parent 91c14f2 commit 9d77646

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Authenticator/Passport/Passport.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,9 @@ public function getAttribute(string $name, $default = null)
103103
{
104104
return $this->attributes[$name] ?? $default;
105105
}
106+
107+
public function getAttributes(): array
108+
{
109+
return $this->attributes;
110+
}
106111
}

0 commit comments

Comments
 (0)