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//ly.fwmnzf.com/addons/baidupush/library/push/Driver.php
<?php

namespace addons\baidupush\library\push;

/**
 * Push基础类
 */
abstract class Driver
{
    protected $options = [];
    protected $error = '';
    protected $data = [
        "remain" => 0,
        "success" => 0,
        "not_same_site" => [],
        "not_valid" => [],
    ];

    /**
     * 推送实时链接
     * @param array $urls URL链接数组
     * @return bool
     */
    abstract public function realtime($urls);

    /**
     * 推送历史链接
     * @param array $urls URL链接数组
     * @return  bool
     */
    abstract public function history($urls);

    /**
     * 删除链接
     * @param array $urls URL链接数组
     * @return  boolean
     */
    abstract public function delete($urls);

    /**
     * 获取错误信息
     * @return string
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * 设置错误信息
     * @param string $msg
     */
    protected function setError($msg)
    {
        $this->error = $msg;
    }

    /**
     * 获取返回的数据
     * @return mixed
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * 设置返回的数据
     * @param mixed $data
     */
    protected function setData($data)
    {
        $this->data = array_merge($this->data, $data);
    }
}