XML_Serializer::_serializeValue PHP Method

_serializeValue() public method

This method checks for the type of the value and calls the appropriate method
public _serializeValue ( mixed $value, string $tagName = null, array $attributes = [] ) : string
$value mixed tag value
$tagName string tag name
$attributes array attributes
return string
    function _serializeValue($value, $tagName = null, $attributes = array())
    {
        if (is_array($value)) {
            $xml = $this->_serializeArray($value, $tagName, $attributes);
        } elseif (is_object($value)) {
            $xml = $this->_serializeObject($value, $tagName);
        } else {
            $tag = array('qname' => $tagName, 'attributes' => $attributes, 'content' => $value);
            $xml = $this->_createXMLTag($tag);
        }
        return $xml;
    }