* @copyright 2014 Fabian Grutschus. All rights reserved. * @license BSD * @link http://github.com/fabiang/xmpp */ namespace Fabiang\Xmpp\Protocol; use Fabiang\Xmpp\Util\XML; /** * Protocol setting for Xmpp. * * @package Xmpp\Protocol */ class BlockUser implements ProtocolImplementationInterface { protected $from; // the jid of the user to block protected $accountjid; /** * {@inheritDoc} */ public function toString() { return XML::quoteMessage( ' ', $this->getFrom(), XML::generateId(), $this->getJabberID() ); } /** * Get JabberID. * * @return string */ public function getJabberID() { return $this->accountjid; } /** * Set abberID. * * @param string $accountjid * @return $this */ public function setJabberID($accountjid) { $this->accountjid = (string) $accountjid; return $this; } /** * Get JabberID. * * @return string */ public function getFrom() { return $this->from; } /** * Set abberID. * * @param string $nickname * @return $this */ public function setFrom($from) { $this->from = (string) $from; return $this; } }