Version 5.0.0 beta 1

This commit is contained in:
Neo committed 2025-12-19 16:27:35 -08:00
1 parent 25ddeb65d6
commit 15c7beabc5
6736 files changed
+627902 -497943

No files matched your search

@@ -11,34 +11,38 @@
namespace IPS\core\ProfileFields\Api;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
use IPS\Member;
use function defined;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* API output for custom fields groups
*/
class _Field
class Field
{
/**
* @brief Name
*/
protected $name;
protected string $name = '';
/**
* @brief Value
*/
protected $value;
protected mixed $value = null;
/**
* Constructor
*
* @param string $name Group name
* @param array $value Values
* @param mixed $value Values
*/
public function __construct( $name, $value )
public function __construct( string $name, mixed $value )
{
$this->name = $name;
$this->value = $value;
@@ -47,12 +51,12 @@ class _Field
/**
* Get output for API
*
* @param \IPS\Member|NULL $authorizedMember The member making the API request or NULL for API Key / client_credentials
* @param Member|NULL $authorizedMember The member making the API request or NULL for API Key / client_credentials
* @return array
* @apiresponse string name Field name
* @apiresponse string value Value
*/
public function apiOutput( \IPS\Member $authorizedMember = NULL )
public function apiOutput( Member $authorizedMember = NULL ): array
{
return array( 'name' => $this->name, 'value' => $this->value );
}