summaryrefslogtreecommitdiffstats
path: root/Core/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'Core/Exception')
-rw-r--r--Core/Exception/AccountStatusException.php23
-rw-r--r--Core/Exception/AuthenticationException.php4
-rw-r--r--Core/Exception/UsernameNotFoundException.php23
3 files changed, 48 insertions, 2 deletions
diff --git a/Core/Exception/AccountStatusException.php b/Core/Exception/AccountStatusException.php
index 5a16673..d89d553 100644
--- a/Core/Exception/AccountStatusException.php
+++ b/Core/Exception/AccountStatusException.php
@@ -43,4 +43,27 @@ abstract class AccountStatusException extends AuthenticationException
{
$this->user = $user;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function serialize()
+ {
+ return serialize(array(
+ $this->user,
+ parent::serialize(),
+ ));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function unserialize($str)
+ {
+ list(
+ $this->user,
+ $parentData
+ ) = unserialize($str);
+ parent::unserialize($parentData);
+ }
}
diff --git a/Core/Exception/AuthenticationException.php b/Core/Exception/AuthenticationException.php
index d67d41e..7958ff7 100644
--- a/Core/Exception/AuthenticationException.php
+++ b/Core/Exception/AuthenticationException.php
@@ -46,7 +46,7 @@ class AuthenticationException extends \RuntimeException implements \Serializable
public function serialize()
{
return serialize(array(
- $this->extraInformation,
+ $this->token,
$this->code,
$this->message,
$this->file,
@@ -57,7 +57,7 @@ class AuthenticationException extends \RuntimeException implements \Serializable
public function unserialize($str)
{
list(
- $this->extraInformation,
+ $this->token,
$this->code,
$this->message,
$this->file,
diff --git a/Core/Exception/UsernameNotFoundException.php b/Core/Exception/UsernameNotFoundException.php
index 421fada..9a9989f 100644
--- a/Core/Exception/UsernameNotFoundException.php
+++ b/Core/Exception/UsernameNotFoundException.php
@@ -48,4 +48,27 @@ class UsernameNotFoundException extends AuthenticationException
{
$this->username = $username;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function serialize()
+ {
+ return serialize(array(
+ $this->username,
+ parent::serialize(),
+ ));
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function unserialize($str)
+ {
+ list(
+ $this->username,
+ $parentData
+ ) = unserialize($str);
+ parent::unserialize($parentData);
+ }
}