src/MVQN/REST/RestObject.php
public function toArray(string $method = "", bool $filter = true): array
    {
        $json = $this->toJSON($method, $filter, 0);
        $assoc = json_decode($json, true);
        return $assoc;
    }
public function toArray(string $method = "", bool $filter = true): array
    {
        $json = $this->toJSON($method, $filter, 0);
        $assoc = json_decode($json, true);
        return $assoc;
    }
Converts the RestObject to it's associative array representation, removing and values that should not be provided
given the specified HTTP method/verb and optionally removing all null fields not specifically annotated with
'@keepNull' or '@keepNullElements'.

@param string $method The HTTP method/verb for which to examine each property for exclusion.
@param bool $filter A flag to request the resulting JSON be stripped of fields containing null values.
@return array Returns an associative array prepared for provision to any HTTP REST request body.
@throws \Exception