protected function _buildCache()
    {
        $cacheTpl = "<?php\n\$source_version=%s;\n\$cache_version=%s;\n\$properties=%s;\n\$browsers=%s;\n\$userAgents=%s;\n\$patterns=%s;\n";

        $propertiesArray = $this->_array2string($this->_properties);
        $patternsArray = $this->_array2string($this->_patterns);
        $userAgentsArray = $this->_array2string($this->_userAgents);
        $browsersArray = $this->_array2string($this->_browsers);

        return sprintf(
            $cacheTpl,
            "'" . $this->_source_version . "'",
            "'" . self::CACHE_FILE_VERSION . "'",
            $propertiesArray,
            $browsersArray,
            $userAgentsArray,
            $patternsArray
        );
    }
protected function _buildCache()
    {
        $cacheTpl = "<?php\n\$source_version=%s;\n\$cache_version=%s;\n\$properties=%s;\n\$browsers=%s;\n\$userAgents=%s;\n\$patterns=%s;\n";

        $propertiesArray = $this->_array2string($this->_properties);
        $patternsArray = $this->_array2string($this->_patterns);
        $userAgentsArray = $this->_array2string($this->_userAgents);
        $browsersArray = $this->_array2string($this->_browsers);

        return sprintf(
            $cacheTpl,
            "'" . $this->_source_version . "'",
            "'" . self::CACHE_FILE_VERSION . "'",
            $propertiesArray,
            $browsersArray,
            $userAgentsArray,
            $patternsArray
        );
    }
protected function _buildCache ( ) { $ cacheTpl = "<?php\n\$source_version=%s;\n\$cache_version=%s;\n\$properties=%s;\n\$browsers=%s;\n\$userAgents=%s;\n\$patterns=%s;\n" ; $ propertiesArray = $ this -> _array2string ( $ this -> _properties ) ; $ patternsArray = $ this -> _array2string ( $ this -> _patterns ) ; $ userAgentsArray = $ this -> _array2string ( $ this -> _userAgents ) ; $ browsersArray = $ this -> _array2string ( $ this -> _browsers ) ; return sprintf ( $ cacheTpl , "'" . $ this -> _source_version . "'" , "'" . self :: CACHE_FILE_VERSION . "'" , $ propertiesArray , $ browsersArray , $ userAgentsArray , $ patternsArray ) ; }
Parses the array to cache and creates the PHP string to write to disk

@return string the PHP string to save into the cache file
Parses the array to cache and creates the PHP string to write to disk