<commit_before><?php
/**
 * Keeps track of file versions.
 *
 * @category  ZendExt
 * @package   ZendExt
 * @copyright 2010 Monits
 * @license   Copyright (C) 2010. All rights reserved.
 * @version   Release: 1.0.0
 * @link      http://www.zendext.com/
 * @since     1.0.0
 */

/**
 * Keeps track of file versions.
 *
 * @category  ZendExt
 * @package   ZendExt
 * @author    jpcivile <<EMAIL>>
 * @copyright 2010 Monits
 * @license   Copyright 2010. All rights reserved.
 * @version   Release: 1.0.0
 * @link      http://www.zendext.com/
 * @since     1.0.0
 */
class ZendExt_Versioner
{
    private $_cache;

    private $_keyPrefix = 'zversioner_';

    private $_checkInterval = 14400; // 4 hours

    private $_updateDelayTime = 1800; // 30 minutes

    private $_time = null;

    private $_files = array();

    /**
     * Create a new Zend_Versioner instance.
     *
     * @param Zend_Cache_Core $cache           Instance of Zend_Cache frontend
     *                                         to keep track of version data.
     * @param integer         $checkInterval   The seconds that must elapse
     *                                         before checking for updates.
     * @param integer         $updateDelayTime The seconds between a file
     *                                         modification and version update.
     * @param string          $keyPrefix       The prefix to use for cache.
     */
    public function __construct(Zend_Cache_Core $cache, $checkInterval = null,
        $updateDelayTime = null, $keyPrefix = null)
    {
        $this->_cache = $cache;
        $this->_time = time();

        if ($keyPrefix !== null) {
            $this->_keyPrefix = $keyPrefix;
        }

        if ( $checkInterval !== null ) {

            $this->_checkInterval = $checkInterval;
        }

        if ( $updateDelayTime !== null ) {

            $this->_updateDelayTime = $updateDelayTime;
        }
    }

    /**
     * Set a Zend_Cache frontend instance.
     *
     * @param Zend_Cache_Core $cache The cache instance to use.
     *
     * @return void
     */
    public function setCache(Zend_Cache_Core $cache)
    {
        $this->_cache = $cache;
    }

    /**
     * Get the current Zend_Cache frontend instance being used.
     *
     * @return Zend_Cache_Core
     */
    public function getCache()
    {
        return $this->_cache;<commit_msg>Mantis test: @resolved #18<commit_after><?php
/**
 * Keeps track of file versions.
 *
 * @category  ZendExt
 * @package   ZendExt
 * @copyright 2010 Monits
 * @license   Copyright (C) 2010. All rights reserved.
 * @version   Release: 1.0.0
 * @link      http://www.zendext.com/
 * @since     1.0.0
 */

/**
 * Keeps track of file versions.
 *
 * @category  ZendExt
 * @package   ZendExt
 * @author    jpcivile <<EMAIL>>
 * @copyright 2010 Monits
 * @license   Copyright 2010. All rights reserved.
 * @version   Release: 1.0.0
 * @link      http://www.zendext.com/
 * @since     1.0.0
 */
class ZendExt_Versioner
{
    private $_cache;

    private $_keyPrefix = 'zversioner_';

    private $_checkInterval = 14400; // 4 hours

    private $_updateDelayTime = 1800; // 30 minutes

    private $_time = null;

    private $_files = array();

    /**
     * Create a new Zend_Versioner instance.
     *
     * @param Zend_Cache_Core $cache           Instance of Zend_Cache frontend
     *                                         to keep track of version data.
     * @param integer         $checkInterval   The seconds that must elapse
     *                                         before checking for updates.
     * @param integer         $updateDelayTime The seconds between a file
     *                                         modification and version update.
     * @param string          $keyPrefix       The prefix to use for cache.
     */
    public function __construct(Zend_Cache_Core $cache, $checkInterval = null,
        $updateDelayTime = null, $keyPrefix = null)
    {
        $this->_cache = $cache;
        $this->_time = time();

        if ($keyPrefix !== null) {
            $this->_keyPrefix = $keyPrefix;
        }

        if ($checkInterval !== null) {
            $this->_checkInterval = $checkInterval;
        }

        if ($updateDelayTime !== null) {
            $this->_updateDelayTime = $updateDelayTime;
        }
    }

    /**
     * Set a Zend_Cache frontend instance.
     *
     * @param Zend_Cache_Core $cache The cache instance to use.
     *
     * @return void
     */
    public function setCache(Zend_Cache_Core $cache)
    {
        $this->_cache = $cache;
    }

    /**
     * Get the current Zend_Cache frontend instance being used.
     *
     * @return Zend_Cache_Core
     */
    public function getCache()
    {
        return $this->_cache;
{'fraction_non_alphanumeric': 0.10441514961288972, 'fraction_numerical': 0.0171584013391923, 'mean_word_length': 1.808460634547591, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1346649', 'n_tokens_mistral': 1430, 'n_tokens_neox': 1330, 'n_words': 390}