Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -99,6 +99,12 @@ class Options
*/
protected $jid;
/**
*
* @var string
*/
protected $sid;
/**
*
* @var boolean
@ -109,7 +115,7 @@ class Options
*
* @var array
*/
protected $users = array();
protected $users = [];
/**
* Timeout for connection.
@ -123,10 +129,20 @@ class Options
*
* @var array
*/
protected $authenticationClasses = array(
protected $authenticationClasses = [
'digest-md5' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\DigestMd5',
'plain' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Plain'
);
'plain' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Plain',
'anonymous' => '\\Fabiang\\Xmpp\\EventListener\\Stream\\Authentication\\Anonymous'
];
/**
* Options used to create a stream context
*
* @var array
*/
protected $contextOptions = [];
/**
* Constructor.
@ -283,6 +299,18 @@ class Options
return $this;
}
/**
* Get resource.
*
* @return string
*/
public function getResource()
{
$username = $this->getUsername();
$username = explode('/', $username);
return isset($username[1]) ? $username[1] : '';
}
/**
* Get password.
*
@ -327,6 +355,28 @@ class Options
return $this;
}
/**
* Get users jid.
*
* @return string
*/
public function getSid()
{
return $this->sid;
}
/**
* Set users jid.
*
* @param string $jid
* @return $this
*/
public function setSid($sid)
{
$this->sid = (string) $sid;
return $this;
}
/**
* Is user authenticated.
*
@ -413,4 +463,26 @@ class Options
$this->timeout = (int) $timeout;
return $this;
}
/**
* Get context options for connection
*
* @return array
*/
public function getContextOptions()
{
return $this->contextOptions;
}
/**
* Set context options for connection
*
* @param array $contextOptions
* @return \Fabiang\Xmpp\Options
*/
public function setContextOptions($contextOptions)
{
$this->contextOptions = (array) $contextOptions;
return $this;
}
}