Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.32.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : abstract-proxy.php
<?php

abstract class Brizy_Public_AbstractProxy extends Brizy_Editor_Asset_StaticFile
{

    /**
     * @var Brizy_Editor_UrlBuilder
     */
    protected $urlBuilder;


    /**
     * @var array
     */
    protected $config;


    /**
     * Brizy_Public_AssetProxy constructor.
     *
     * @param Brizy_Editor_UrlBuilder $url_builder
     * @param $config
     */
    public function __construct($url_builder, $config)
    {
        $this->urlBuilder = $url_builder;
        $this->config = $config;

        if ($this->can_process()) {
            add_action('wp', array($this, 'process_query'), -1);
            add_filter('query_vars', array($this, 'query_vars'));
        }

    }

    /**
     * @param $vars
     *
     * @return array
     */
    public function query_vars($vars)
    {
        $endpoint_keys = $this->get_endpoint_keys();

        if (!is_array($endpoint_keys)) {
            $endpoint_keys = array();
        }

        $vars = array_merge($vars, $endpoint_keys);

        return $vars;
    }

    private function can_process()
    {
        $endpoint_keys = $this->get_endpoint_keys();
        foreach ($endpoint_keys as $endpoint_key) {
            if (!isset($_REQUEST[$endpoint_key])) {
                return false;
            }
        }

        return true;
    }

    /**
     * @return mixed
     */
    abstract public function process_query();

    /**
     * @return string
     */
    abstract protected function get_endpoint_keys();
}
© 2025 XylotrechusZ