<commit_before><?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to version 1.0 of the Zend Framework
 * license, that is bundled with this package in the file LICENSE, and
 * is available through the world-wide-web at the following URL:
 * http://www.zend.com/license/framework/1_0.txt. If you did not receive
 * a copy of the Zend Framework license and are unable to obtain it
 * through the world-wide-web, please send a note to <EMAIL>
 * so we can mail you a copy immediately.
 *
 * @package    Zend_XmlRpc
 * @subpackage Value
 * @copyright  Copyright (c) 2005-2006 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
 */


/** Zend_XmlRpc_Value_Exception */
require_once 'Zend/XmlRpc/Value/Exception.php';

/** Zend_XmlRpc_Value_Scalar */
require_once 'Zend/XmlRpc/Value/Scalar.php';

/** Zend_XmlRpc_Value_Base64 */
require_once 'Zend/XmlRpc/Value/Base64.php';

/** Zend_XmlRpc_Value_Boolean */
require_once 'Zend/XmlRpc/Value/Boolean.php';

/** Zend_XmlRpc_Value_DateTime */
require_once 'Zend/XmlRpc/Value/DateTime.php';

/** Zend_XmlRpc_Value_Double */
require_once 'Zend/XmlRpc/Value/Double.php';

/** Zend_XmlRpc_Value_Integer */
require_once 'Zend/XmlRpc/Value/Integer.php';

/** Zend_XmlRpc_Value_String */
require_once 'Zend/XmlRpc/Value/String.php';

/** Zend_XmlRpc_Value_Collection */
require_once 'Zend/XmlRpc/Value/Collection.php';

/** Zend_XmlRpc_Value_Array */
require_once 'Zend/XmlRpc/Value/Array.php';

/** Zend_XmlRpc_Value_Struct */
require_once 'Zend/XmlRpc/Value/Struct.php';


/**
 * Represent a native XML-RPC value entity, used as parameters for the methods
 * called by the Zend_XmlRpc_Client object and as the return value for those calls.
 *
 * This object as a very important static function Zend_XmlRpc_Value::getXmlRpcValue, this
 * function acts likes a factory for the Zend_XmlRpc_Value objects
 *
 * Using this function, users/Zend_XmlRpc_Client object can create the Zend_XmlRpc_Value objects
 * from PHP variables, XML string or by specifing the exact XML-RPC natvie type
 *
 * @package    Zend_XmlRpc
 * @copyright  Copyright (c) 2005-2006 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
 */
abstract class Zend_XmlRpc_Value
{
    /**
     * The native XML-RPC representation of this object's value
     *
     * If the native type of this object is array or struct, this will be an array
     * of Zend_XmlRpc_Value objects
     */
    protected $_value;

    /**
     * The native XML-RPC type of this object
     * One of the XMLRPC_TYPE_* constants
     */
    protected $_type;

    /**
     * XML code representation of this object (will be calculated only once)
     */
    protected $_as_xml;

    /**
     * DOMElement representation of object (will be calculated only once)
     */
    protected $_as_dom;

    /**
     * Specify that the XML-RPC native type will be auto detected from a PHP variable type
     */
    const AUTO_DETECT_TYPE = 'auto_detect';

    /**
     * Specify that the XML-RPC value will be parsed out from a given XML code
     */
    const XML_STRING = 'xml';

    /**
     * All the XML-RPC native types
     */
    const XMLRPC_TYPE_I4       = 'i4';
    const XMLRPC_TYPE_INTEGER  = 'int';
    const XMLRPC_TYPE_DOUBLE   = 'double';
    const XMLRPC_TYPE_BOOLEAN  = 'boolean';
    const XMLRPC_TYPE_STRING   = 'string';
    const XMLRPC_TYPE_DATETIME = 'dateTime.iso8601';
    const XMLRPC_TYPE_BASE64   = 'base64';
    const XMLRPC_TYPE_ARRAY    = 'array';
    const XMLRPC_TYPE_STRUCT   = 'struct';


    /**
     * Get the native XML-RPC type (the type is one of the Zend_XmlRpc_Value::XMLRPC_TYPE_* constants)
     *
     * @return string
     */
    public function getType()
    {
        return $this->_type;
    }


    /**
     * Return the value of this object, convert the XML-RPC native value into a PHP variable
     *
     * @return mixed
     */
    abstract public function getValue();


    /**
     * Return the XML code that represent a native MXL-RPC value
     *
     * @return string
     */
    abstract public function getAsXML();

    /**
     * Return DOMElement representation of object
     * 
     * @return DOMElement
     */
    public function getAsDOM()
    {
        if (!$this->_as_dom) {
            $this->getAsXML();
        }
<commit_msg>Completed getAsDOM() method.  It was defined but never implemented.<commit_after><?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to version 1.0 of the Zend Framework
 * license, that is bundled with this package in the file LICENSE, and
 * is available through the world-wide-web at the following URL:
 * http://www.zend.com/license/framework/1_0.txt. If you did not receive
 * a copy of the Zend Framework license and are unable to obtain it
 * through the world-wide-web, please send a note to <EMAIL>
 * so we can mail you a copy immediately.
 *
 * @package    Zend_XmlRpc
 * @subpackage Value
 * @copyright  Copyright (c) 2005-2006 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
 */


/** Zend_XmlRpc_Value_Exception */
require_once 'Zend/XmlRpc/Value/Exception.php';

/** Zend_XmlRpc_Value_Scalar */
require_once 'Zend/XmlRpc/Value/Scalar.php';

/** Zend_XmlRpc_Value_Base64 */
require_once 'Zend/XmlRpc/Value/Base64.php';

/** Zend_XmlRpc_Value_Boolean */
require_once 'Zend/XmlRpc/Value/Boolean.php';

/** Zend_XmlRpc_Value_DateTime */
require_once 'Zend/XmlRpc/Value/DateTime.php';

/** Zend_XmlRpc_Value_Double */
require_once 'Zend/XmlRpc/Value/Double.php';

/** Zend_XmlRpc_Value_Integer */
require_once 'Zend/XmlRpc/Value/Integer.php';

/** Zend_XmlRpc_Value_String */
require_once 'Zend/XmlRpc/Value/String.php';

/** Zend_XmlRpc_Value_Collection */
require_once 'Zend/XmlRpc/Value/Collection.php';

/** Zend_XmlRpc_Value_Array */
require_once 'Zend/XmlRpc/Value/Array.php';

/** Zend_XmlRpc_Value_Struct */
require_once 'Zend/XmlRpc/Value/Struct.php';


/**
 * Represent a native XML-RPC value entity, used as parameters for the methods
 * called by the Zend_XmlRpc_Client object and as the return value for those calls.
 *
 * This object as a very important static function Zend_XmlRpc_Value::getXmlRpcValue, this
 * function acts likes a factory for the Zend_XmlRpc_Value objects
 *
 * Using this function, users/Zend_XmlRpc_Client object can create the Zend_XmlRpc_Value objects
 * from PHP variables, XML string or by specifing the exact XML-RPC natvie type
 *
 * @package    Zend_XmlRpc
 * @copyright  Copyright (c) 2005-2006 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
 */
abstract class Zend_XmlRpc_Value
{
    /**
     * The native XML-RPC representation of this object's value
     *
     * If the native type of this object is array or struct, this will be an array
     * of Zend_XmlRpc_Value objects
     */
    protected $_value;

    /**
     * The native XML-RPC type of this object
     * One of the XMLRPC_TYPE_* constants
     */
    protected $_type;

    /**
     * XML code representation of this object (will be calculated only once)
     */
    protected $_as_xml;

    /**
     * DOMElement representation of object (will be calculated only once)
     */
    protected $_as_dom;

    /**
     * Specify that the XML-RPC native type will be auto detected from a PHP variable type
     */
    const AUTO_DETECT_TYPE = 'auto_detect';

    /**
     * Specify that the XML-RPC value will be parsed out from a given XML code
     */
    const XML_STRING = 'xml';

    /**
     * All the XML-RPC native types
     */
    const XMLRPC_TYPE_I4       = 'i4';
    const XMLRPC_TYPE_INTEGER  = 'int';
    const XMLRPC_TYPE_DOUBLE   = 'double';
    const XMLRPC_TYPE_BOOLEAN  = 'boolean';
    const XMLRPC_TYPE_STRING   = 'string';
    const XMLRPC_TYPE_DATETIME = 'dateTime.iso8601';
    const XMLRPC_TYPE_BASE64   = 'base64';
    const XMLRPC_TYPE_ARRAY    = 'array';
    const XMLRPC_TYPE_STRUCT   = 'struct';


    /**
     * Get the native XML-RPC type (the type is one of the Zend_XmlRpc_Value::XMLRPC_TYPE_* constants)
     *
     * @return string
     */
    public function getType()
    {
        return $this->_type;
    }


    /**
     * Return the value of this object, convert the XML-RPC native value into a PHP variable
     *
     * @return mixed
     */
    abstract public function getValue();


    /**
     * Return the XML code that represent a native MXL-RPC value
     *
     * @return string
     */
    abstract public function getAsXML();

    /**
     * Return DOMElement representation of object
     * 
     * @return DOMElement
     */
    public function getAsDOM()
    {
        if (!$this->_as_dom) {
            $doc = new DOMDocument();
            $doc->loadXML($this->getAsXML());
            $this->_as_dom = $doc->documentElement;
        }

{'fraction_non_alphanumeric': 0.09990119661872873, 'fraction_numerical': 0.009221648918651883, 'mean_word_length': 2.9991220368744513, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6933707', 'n_tokens_mistral': 2971, 'n_tokens_neox': 2822, 'n_words': 849}