예제 #1
0
파일: User.php 프로젝트: dzoke/CmsBundle
 public function serialize()
 {
     return serialize(array($this->facebookId, parent::serialize()));
 }
예제 #2
0
파일: BaseUser.php 프로젝트: ephp/acl
 public function serialize()
 {
     $s = array();
     if (method_exists($this, 'serializeFacebook')) {
         $s[] = $this->serializeFacebook();
     } else {
         $s[] = 'no-facebook';
     }
     if (method_exists($this, 'serializeTwitter')) {
         $s[] = $this->serializeTwitter();
     } else {
         $s[] = 'no-twitter';
     }
     if (method_exists($this, 'serializeGoogle')) {
         $s[] = $this->serializeGoogle();
     } else {
         $s[] = 'no-google';
     }
     $s[] = parent::serialize();
     return serialize($s);
 }
예제 #3
0
 /**
  * Serializes the user.
  *
  * The serialized data have to contain the fields used during check for
  * changes and the id.
  *
  * @return string
  */
 public function serialize()
 {
     return serialize(array(parent::serialize(), $this->name, $this->attempts, $this->facebookID, $this->googleID));
 }
예제 #4
0
 public function serialize()
 {
     $parent = parent::serialize();
     $data = ['parent' => $parent, 'facebookId' => $this->facebookId, 'vkontakteId' => $this->vkontakteId];
     return serialize($data);
 }