public function serialize()
    {
        return serialize(
            [
                $this->id,
                $this->nameId,
                $this->institution,
                $this->email,
                $this->commonName,
                $this->preferredLocale
            ]
        );
    }
public function serialize()
    {
        return serialize(
            [
                $this->id,
                $this->nameId,
                $this->institution,
                $this->email,
                $this->commonName,
                $this->preferredLocale
            ]
        );
    }
public function serialize ( ) { return serialize ( [ $ this -> id , $ this -> nameId , $ this -> institution , $ this -> email , $ this -> commonName , $ this -> preferredLocale ] ) ; }
Used so that we can serialize the Identity within the SAMLToken, so we can store the token in a session.
This to support persistent login

@return string
Used so that we can serialize the Identity within the SAMLToken so we can store the token in a session . This to support persistent login