add clear
This commit is contained in:
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace officialaccount\dcaler;
|
||||
|
||||
|
||||
class SnsInfo
|
||||
{
|
||||
|
||||
private $openid;
|
||||
private $nickname;
|
||||
private $sex;
|
||||
private $province;
|
||||
private $city;
|
||||
private $country;
|
||||
private $headimgurl;
|
||||
private $privilege;
|
||||
private $unionid;
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getOpenid()
|
||||
{
|
||||
return $this->openid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $openid
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setOpenid($openid)
|
||||
{
|
||||
$this->openid = $openid;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getNickname()
|
||||
{
|
||||
return $this->nickname;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $nickname
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setNickname($nickname)
|
||||
{
|
||||
$this->nickname = $nickname;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getSex()
|
||||
{
|
||||
return $this->sex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $sex
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setSex($sex)
|
||||
{
|
||||
$this->sex = $sex;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getProvince()
|
||||
{
|
||||
return $this->province;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $province
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setProvince($province)
|
||||
{
|
||||
$this->province = $province;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCity()
|
||||
{
|
||||
return $this->city;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $city
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setCity($city)
|
||||
{
|
||||
$this->city = $city;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCountry()
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $country
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setCountry($country)
|
||||
{
|
||||
$this->country = $country;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getHeadimgurl()
|
||||
{
|
||||
return $this->headimgurl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $headimgurl
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setHeadimgurl($headimgurl)
|
||||
{
|
||||
$this->headimgurl = $headimgurl;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getPrivilege()
|
||||
{
|
||||
return $this->privilege;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $privilege
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setPrivilege($privilege)
|
||||
{
|
||||
$this->privilege = $privilege;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getUnionid()
|
||||
{
|
||||
return $this->unionid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $unionid
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public function setUnionid($unionid)
|
||||
{
|
||||
$this->unionid = $unionid;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param $object
|
||||
* @return SnsInfo
|
||||
*/
|
||||
public static function instance($object)
|
||||
{
|
||||
$class = new SnsInfo();
|
||||
$class->setOpenid($object['openid']);
|
||||
$class->setNickname($object['nickname']);
|
||||
$class->setSex($object['sex']);
|
||||
$class->setCity($object['city']);
|
||||
$class->setProvince($object['province']);
|
||||
$class->setCountry($object['country']);
|
||||
$class->setHeadimgurl($object['headimgurl']);
|
||||
$class->setUnionid($object['unionid']);
|
||||
$class->setPrivilege($object['privilege']);
|
||||
return $class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user