Copied!
Abstract
Methods
public __construct(array $initialValues = [])
public __get(string $field) : ?mixed
 

Unset fields will return null

public __set(string $field, ?mixed $value)
 
  • return mixed value being set to allow for assignment chaining
public getData() : array
 
  • return array representation of data
public getfields() : array
 
  • return array all the valid fields for the object. Index is field name and value is the type.
public getJSON() : string
 
  • return string pretty print JSON
Properties
protected static array $fields = []
 
  • var array indexed by field name containing field type. Valid types are:
    • bool
    • float
    • int
    • string
    • FQN (fully qualified name) PHP class
    • array<FQN>
    • array of case sensitive string or integer enums
    • array of case sensitive string or integer enums
protected static array $maxLength = []
 
  • var array<string,int> maximum allowed values. Arrays are size, int and float are values, strings are length.
protected static array $minLength = []
 
  • var array<string,int> minimum allowed values. Arrays are size, int and float are values, strings are length.
protected static array $requiredFields = []
 
  • var string[] required fields.
Properties
private bool $constructingFromArray = false
 
  • var bool $constructingFromArray set to true if we are constructing from an array so we don't type check for objects
private array $data = []
 

$var array<string, mixed> the actual object data by field name.

private static array $scalars = ['bool' => true, 'float' => true, 'int' => true, 'string' => true, 'array' => true]
 
  • var array<string,bool> supported scalars
private array $setFields = []
 
  • var array<string,bool> indicates which values are set to reduce data output.
Properties
protected static array $fields = []
 
  • var array indexed by field name containing field type. Valid types are:
    • bool
    • float
    • int
    • string
    • FQN (fully qualified name) PHP class
    • array<FQN>
    • array of case sensitive string or integer enums
    • array of case sensitive string or integer enums
protected static array $maxLength = []
 
  • var array<string,int> maximum allowed values. Arrays are size, int and float are values, strings are length.
protected static array $minLength = []
 
  • var array<string,int> minimum allowed values. Arrays are size, int and float are values, strings are length.
protected static array $requiredFields = []
 
  • var string[] required fields.
private static array $scalars = ['bool' => true, 'float' => true, 'int' => true, 'string' => true, 'array' => true]
 
  • var array<string,bool> supported scalars
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration