File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/Symfony/Component/Security Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ CHANGELOG
442.1.0
55-----
66
7+ * Added the Serializable interface on the Role class
78 * [ BC BREAK] The signature of ExceptionListener has changed
89 * changed the HttpUtils constructor signature to take a UrlGenerator and a UrlMatcher instead of a Router
910 * EncoderFactoryInterface::getEncoder() can now also take a class name as an argument
Original file line number Diff line number Diff line change 1717 *
1818 * @author Fabien Potencier <fabien@symfony.com>
1919 */
20- class Role implements RoleInterface
20+ class Role implements RoleInterface, \Serializable
2121{
2222 private $ role ;
2323
@@ -38,4 +38,20 @@ public function getRole()
3838 {
3939 return $ this ->role ;
4040 }
41+
42+ /**
43+ * {@inheritdoc}
44+ */
45+ public function serialize ()
46+ {
47+ return serialize ($ this ->role );
48+ }
49+
50+ /**
51+ * {@inheritdoc}
52+ */
53+ public function unserialize ($ serialized )
54+ {
55+ $ this ->role = unserialize ($ serialized );
56+ }
4157}
You can’t perform that action at this time.
0 commit comments