<?php
namespace App\Entity\System\SocialAccounts;
use App\Entity\System\SocialAccount;
use Doctrine\ORM\Mapping as ORM;
/**
* Class TwitterSocialAccount
* @package Products\SocialBundle\Entity\SocialAccounts
*
* @ORM\Entity(
* repositoryClass = "App\Doctrine\Repository\System\SocialAccounts\TwitterSocialAccountRepository",
* )
*/
class TwitterSocialAccount extends SocialAccount
{
const DISCR = 'twitter';
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $twitterUserId = null;
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $twitterUserName = null;
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $twitterAccessToken = null;
/**
* @var string|null
*
* @ORM\Column(
* type = "string",
* nullable = false,
* )
*/
protected ?string $twitterTokenSecret = null;
/**
* @return string|null
*/
public function getTwitterUserId(): ?string
{
return $this->twitterUserId;
}
/**
* @param string $twitterUserId
* @return $this
*/
public function setTwitterUserId(string $twitterUserId): self
{
$this->twitterUserId = $twitterUserId;
return $this;
}
/**
* @return string|null
*/
public function getTwitterUserName(): ?string
{
return $this->twitterUserName;
}
/**
* @param string $twitterUserName
* @return $this
*/
public function setTwitterUserName(string $twitterUserName): self
{
$this->twitterUserName = $twitterUserName;
return $this;
}
/**
* @return string|null
*/
public function getTwitterAccessToken(): ?string
{
return $this->twitterAccessToken;
}
/**
* @param string $twitterAccessToken
* @return $this
*/
public function setTwitterAccessToken(string $twitterAccessToken): self
{
$this->twitterAccessToken = $twitterAccessToken;
return $this;
}
/**
* @return string|null
*/
public function getTwitterTokenSecret(): ?string
{
return $this->twitterTokenSecret;
}
/**
* @param string $twitterTokenSecret
* @return $this
*/
public function setTwitterTokenSecret(string $twitterTokenSecret): self
{
$this->twitterTokenSecret = $twitterTokenSecret;
return $this;
}
/**
* {@inheritDoc}
*/
public function __toString(): string
{
return sprintf(
'%s / @%s',
$this->getTwitterUserId(),
$this->getTwitterUserName()
);
}
/**
* {@inheritDoc}
*/
public function getIdentifier(): ?string
{
return $this->getTwitterUserId();
}
}