<commit_before><?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to <EMAIL> so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service_WindowsAzure
 * @subpackage Storage
 * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id$
 */


/**
 * @category   Zend
 * @package    Zend_Service_WindowsAzure
 * @subpackage Storage
 * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_WindowsAzure_Storage_Batch
{	
    /**
     * Storage client the batch is defined on
     * 
     * @var Zend_Service_WindowsAzure_Storage_BatchStorageAbstract
     */
    protected $_storageClient = null;
    
    /**
     * For table storage?
     * 
     * @var boolean
     */
    protected $_forTableStorage = false;
    
    /**
     * Base URL
     * 
     * @var string
     */
    protected $_baseUrl;
    
    /**
     * Pending operations
     * 
     * @var unknown_type
     */
    protected $_operations = array();
    
    /**
     * Does the batch contain a single select?
     * 
     * @var boolean
     */
    protected $_isSingleSelect = false;
    
    /**
     * Creates a new Zend_Service_WindowsAzure_Storage_Batch
     * 
     * @param Zend_Service_WindowsAzure_Storage_BatchStorageAbstract $storageClient Storage client the batch is defined on
     */
    public function __construct(Zend_Service_WindowsAzure_Storage_BatchStorageAbstract $storageClient = null, $baseUrl = '')
    {
        $this->_storageClient = $storageClient;
        $this->_baseUrl       = $baseUrl;
        $this->_beginBatch();
    }
    
	/**
	 * Get base URL for creating requests
	 *
	 * @return string
	 */
	public function getBaseUrl()
	{
		return $this->_baseUrl;
	}
    
    /**
     * Starts a new batch operation set
     * 
     * @throws Zend_Service_WindowsAzure_Exception
     */
    protected function _beginBatch()
    {
        $this->_storageClient->setCurrentBatch($this);
    }
    
    /**
     * Cleanup current batch
     */
    protected function _clean()
    {
        unset($this->_operations);
        $this->_storageClient->setCurrentBatch(null);
        $this->_storageClient = null;
        unset($this);
    }

	/**
	 * Enlist operation in current batch
	 *
	 * @param string $path Path<commit_msg>$this can not be unset #729<commit_after><?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to <EMAIL> so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Service_WindowsAzure
 * @subpackage Storage
 * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id$
 */


/**
 * @category   Zend
 * @package    Zend_Service_WindowsAzure
 * @subpackage Storage
 * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Service_WindowsAzure_Storage_Batch
{	
    /**
     * Storage client the batch is defined on
     * 
     * @var Zend_Service_WindowsAzure_Storage_BatchStorageAbstract
     */
    protected $_storageClient = null;
    
    /**
     * For table storage?
     * 
     * @var boolean
     */
    protected $_forTableStorage = false;
    
    /**
     * Base URL
     * 
     * @var string
     */
    protected $_baseUrl;
    
    /**
     * Pending operations
     * 
     * @var unknown_type
     */
    protected $_operations = array();
    
    /**
     * Does the batch contain a single select?
     * 
     * @var boolean
     */
    protected $_isSingleSelect = false;
    
    /**
     * Creates a new Zend_Service_WindowsAzure_Storage_Batch
     * 
     * @param Zend_Service_WindowsAzure_Storage_BatchStorageAbstract $storageClient Storage client the batch is defined on
     */
    public function __construct(Zend_Service_WindowsAzure_Storage_BatchStorageAbstract $storageClient = null, $baseUrl = '')
    {
        $this->_storageClient = $storageClient;
        $this->_baseUrl       = $baseUrl;
        $this->_beginBatch();
    }
    
	/**
	 * Get base URL for creating requests
	 *
	 * @return string
	 */
	public function getBaseUrl()
	{
		return $this->_baseUrl;
	}
    
    /**
     * Starts a new batch operation set
     * 
     * @throws Zend_Service_WindowsAzure_Exception
     */
    protected function _beginBatch()
    {
        $this->_storageClient->setCurrentBatch($this);
    }
    
    /**
     * Cleanup current batch
     */
    protected function _clean()
    {
        unset($this->_operations);
        $this->_storageClient->setCurrentBatch(null);
        $this->_storageClient = null;
    }

	/**
	 * Enlist operation in current batch
	 *
	 * @param string $path Path
{'fraction_non_alphanumeric': 0.1019690576652602, 'fraction_numerical': 0.006153305203938115, 'mean_word_length': 2.449969678593087, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, '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': '6608436', 'n_tokens_mistral': 1714, 'n_tokens_neox': 1624, 'n_words': 457}