for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Nucleus - XMPP Library for PHP
*
* Copyright (C) 2016, Some rights reserved.
* @author Kacper "Kadet" Donat <[email protected]>
* Contact with author:
* Xmpp: [email protected]
* E-mail: [email protected]
* From Kadet with love.
*/
namespace Kadet\Xmpp\Stream;
use Kadet\Xmpp\Utils\Accessors;
use Kadet\Xmpp\Xml\XmlElement;
* Class Error
* @package Kadet\Xmpp\Stream
* @property-read string $kind Stream error defined condition
* @property-read string $text Stream error text description
* @see http://xmpp.org/rfcs/rfc6120.html#streams-error-syntax
class Error extends XmlElement
{
use Accessors;
public function getKind()
return $this->query("./xmpp:*")->with('xmpp', 'urn:ietf:params:xml:ns:xmpp-streams')->query()->current()->localName;
}
public function getText()
if ($text = $this->query(".//xmpp:text")->with('xmpp', 'urn:ietf:params:xml:ns:xmpp-streams')->query()->current()) {
return $text;
return null;