HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/my.esfyn.top/Expand/phpQuery/phpQuery/plugins/Scripts.php
<?php

/**
 * phpQuery plugin class extending phpQuery object.
 * Methods from this class are callable on every phpQuery object.
 *
 * Class name prefix 'phpQueryObjectPlugin_' must be preserved.
 */
abstract class phpQueryObjectPlugin_Scripts
{
    /**
     * Limit binded methods.
     *
     * null means all public.
     * array means only specified ones.
     *
     * @var array|null
     */
    public static $phpQueryMethods = null;
    public static $config = array();

    /**
     * Enter description here...
     *
     * @param phpQueryObject $self
     */
    public static function script($self, $arg1)
    {
        $params = func_get_args();
        $params = array_slice($params, 2);
        $return = null;
        $config = self::$config;
        if (phpQueryPlugin_Scripts::$scriptMethods[$arg1]) {
            phpQuery::callbackRun(
                phpQueryPlugin_Scripts::$scriptMethods[$arg1],
                array($self, $params, &$return, $config)
            );
        } else if ($arg1 != '__config' && file_exists(dirname(__FILE__) . "/Scripts/$arg1.php")) {
            phpQuery::debug("Loading script '$arg1'");
            require dirname(__FILE__) . "/Scripts/$arg1.php";
        } else {
            phpQuery::debug("Requested script '$arg1' doesn't exist");
        }
        return $return
            ? $return
            : $self;
    }
}

abstract class phpQueryPlugin_Scripts
{
    public static $scriptMethods = array();

    public static function __initialize()
    {
        if (file_exists(dirname(__FILE__) . "/Scripts/__config.php")) {
            include dirname(__FILE__) . "/Scripts/__config.php";
            phpQueryObjectPlugin_Scripts::$config = $config;
        }
    }

    /**
     * Extend scripts' namespace with $name related with $callback.
     *
     * Callback parameter order looks like this:
     * - $this
     * - $params
     * - &$return
     * - $config
     *
     * @param $name
     * @param $callback
     * @return bool
     */
    public static function script($name, $callback)
    {
        if (phpQueryPlugin_Scripts::$scriptMethods[$name])
            throw new Exception("Script name conflict - '$name'");
        phpQueryPlugin_Scripts::$scriptMethods[$name] = $callback;
    }
}

?>