QueryRequest
in package
implements
ModelInterface, ArrayAccess, JsonSerializable
QueryRequest Class Doc Comment
Tags
Table of Contents
Interfaces
- ModelInterface
- Interface abstracting model access.
- ArrayAccess
- JsonSerializable
Constants
- COMPRESSION_NUMBER_0 : mixed = 0
- COMPRESSION_NUMBER_1 : mixed = 1
- DISCRIMINATOR : mixed = null
- FORMAT_COUNT : mixed = 'count'
- FORMAT_CSV : mixed = 'csv'
- FORMAT_IFC : mixed = 'ifc'
- FORMAT_IFCXML : mixed = 'ifcxml'
- FORMAT_JSON : mixed = 'json'
- FORMAT_QIDS : mixed = 'qids'
- FORMAT_XLSX : mixed = 'xlsx'
Properties
- $attributeMap : array<string|int, string>
- Array of attributes where the key is the local name, and the value is the original name
- $container : array<string|int, mixed>
- Associative array for storing property values
- $getters : array<string|int, string>
- Array of attributes to getter functions (for serialization of requests)
- $openAPIFormats : array<string|int, string>
- Array of property to format mappings. Used for (de)serialization
- $openAPIModelName : string
- The original name of the model.
- $openAPINullables : array<string|int, bool>
- Array of nullable properties. Used for (de)serialization
- $openAPINullablesSetToNull : array<string|int, bool>
- If a nullable field gets set to null, insert it here
- $openAPITypes : array<string|int, string>
- Array of property to type mappings. Used for (de)serialization
- $setters : array<string|int, string>
- Array of attributes to setter functions (for deserialization of responses)
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Gets the string presentation of the object
- attributeMap() : array<string|int, mixed>
- Array of attributes where the key is the local name, and the value is the original name
- getActionUuid() : string|null
- Gets action_uuid
- getActionVersion() : int|null
- Gets action_version
- getBvl() : string|null
- Gets bvl
- getColors() : array<string, array<string|int, float>>|null
- Gets colors
- getCompression() : int|null
- Gets compression
- getCompressionAllowableValues() : array<string|int, string>
- Gets allowable values of the enum
- getFilename() : string|null
- Gets filename
- getForceGetQid() : bool|null
- Gets force_get_qid
- getFormat() : string|null
- Gets format
- getFormatAllowableValues() : array<string|int, string>
- Gets allowable values of the enum
- getGroupKeys() : array<string|int, string>|null
- Gets group_keys
- getGroupLevel() : int|null
- Gets group_level
- getGroupPath() : array<string|int, int>|null
- Gets group_path
- getModelName() : string
- The original name of the model.
- getModels() : array<string|int, ModelIdentifier>|null
- Gets models
- getParameters() : array<string, mixed>|null
- Gets parameters
- getQuery() : string|null
- Gets query
- getters() : array<string|int, mixed>
- Array of attributes to getter functions (for serialization of requests)
- getVirtualFeatures() : mixed|null
- Gets virtual_features
- isNullable() : bool
- Checks if a property is nullable
- isNullableSetToNull() : bool
- Checks if a nullable property is set to null.
- jsonSerialize() : mixed
- Serializes the object to a value that can be serialized natively by json_encode().
- listInvalidProperties() : array<string|int, mixed>
- Show all the invalid properties with reasons.
- offsetExists() : bool
- Returns true if offset exists. False otherwise.
- offsetGet() : mixed|null
- Gets offset.
- offsetSet() : void
- Sets value based on offset.
- offsetUnset() : void
- Unsets offset.
- openAPIFormats() : array<string|int, mixed>
- Array of property to format mappings. Used for (de)serialization
- openAPITypes() : array<string|int, mixed>
- Array of property to type mappings. Used for (de)serialization
- setActionUuid() : self
- Sets action_uuid
- setActionVersion() : self
- Sets action_version
- setBvl() : self
- Sets bvl
- setColors() : self
- Sets colors
- setCompression() : self
- Sets compression
- setFilename() : self
- Sets filename
- setForceGetQid() : self
- Sets force_get_qid
- setFormat() : self
- Sets format
- setGroupKeys() : self
- Sets group_keys
- setGroupLevel() : self
- Sets group_level
- setGroupPath() : self
- Sets group_path
- setModels() : self
- Sets models
- setParameters() : self
- Sets parameters
- setQuery() : self
- Sets query
- setters() : array<string|int, mixed>
- Array of attributes to setter functions (for deserialization of responses)
- setVirtualFeatures() : self
- Sets virtual_features
- toHeaderValue() : string
- Gets a header-safe presentation of the object
- valid() : bool
- Validate all the properties in the model return true if all passed
- openAPINullables() : array<string|int, mixed>
- Array of nullable properties
- getOpenAPINullablesSetToNull() : array<string|int, bool>
- Array of nullable field names deliberately set to null
- setIfExists() : void
- Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
- setOpenAPINullablesSetToNull() : void
- Setter - Array of nullable field names deliberately set to null
Constants
COMPRESSION_NUMBER_0
public
mixed
COMPRESSION_NUMBER_0
= 0
COMPRESSION_NUMBER_1
public
mixed
COMPRESSION_NUMBER_1
= 1
DISCRIMINATOR
public
mixed
DISCRIMINATOR
= null
FORMAT_COUNT
public
mixed
FORMAT_COUNT
= 'count'
FORMAT_CSV
public
mixed
FORMAT_CSV
= 'csv'
FORMAT_IFC
public
mixed
FORMAT_IFC
= 'ifc'
FORMAT_IFCXML
public
mixed
FORMAT_IFCXML
= 'ifcxml'
FORMAT_JSON
public
mixed
FORMAT_JSON
= 'json'
FORMAT_QIDS
public
mixed
FORMAT_QIDS
= 'qids'
FORMAT_XLSX
public
mixed
FORMAT_XLSX
= 'xlsx'
Properties
$attributeMap
Array of attributes where the key is the local name, and the value is the original name
protected
static array<string|int, string>
$attributeMap
= ['models' => 'models', 'query' => 'query', 'action_uuid' => 'action_uuid', 'action_version' => 'action_version', 'format' => 'format', 'parameters' => 'parameters', 'virtual_features' => 'virtual_features', 'force_get_qid' => 'force_get_qid', 'filename' => 'filename', 'colors' => 'colors', 'bvl' => 'bvl', 'compression' => 'compression', 'group_path' => 'groupPath', 'group_keys' => 'groupKeys', 'group_level' => 'groupLevel']
$container
Associative array for storing property values
protected
array<string|int, mixed>
$container
= []
$getters
Array of attributes to getter functions (for serialization of requests)
protected
static array<string|int, string>
$getters
= ['models' => 'getModels', 'query' => 'getQuery', 'action_uuid' => 'getActionUuid', 'action_version' => 'getActionVersion', 'format' => 'getFormat', 'parameters' => 'getParameters', 'virtual_features' => 'getVirtualFeatures', 'force_get_qid' => 'getForceGetQid', 'filename' => 'getFilename', 'colors' => 'getColors', 'bvl' => 'getBvl', 'compression' => 'getCompression', 'group_path' => 'getGroupPath', 'group_keys' => 'getGroupKeys', 'group_level' => 'getGroupLevel']
$openAPIFormats
Array of property to format mappings. Used for (de)serialization
protected
static array<string|int, string>
$openAPIFormats
= ['models' => null, 'query' => null, 'action_uuid' => 'uuid', 'action_version' => null, 'format' => null, 'parameters' => null, 'virtual_features' => null, 'force_get_qid' => null, 'filename' => null, 'colors' => null, 'bvl' => null, 'compression' => null, 'group_path' => null, 'group_keys' => null, 'group_level' => null]
Tags
$openAPIModelName
The original name of the model.
protected
static string
$openAPIModelName
= 'QueryRequest'
$openAPINullables
Array of nullable properties. Used for (de)serialization
protected
static array<string|int, bool>
$openAPINullables
= ['models' => false, 'query' => false, 'action_uuid' => false, 'action_version' => false, 'format' => false, 'parameters' => false, 'virtual_features' => true, 'force_get_qid' => false, 'filename' => false, 'colors' => false, 'bvl' => false, 'compression' => false, 'group_path' => true, 'group_keys' => true, 'group_level' => false]
$openAPINullablesSetToNull
If a nullable field gets set to null, insert it here
protected
array<string|int, bool>
$openAPINullablesSetToNull
= []
$openAPITypes
Array of property to type mappings. Used for (de)serialization
protected
static array<string|int, string>
$openAPITypes
= ['models' => '\BIMworks\Model\ModelIdentifier[]', 'query' => 'string', 'action_uuid' => 'string', 'action_version' => 'int', 'format' => 'string', 'parameters' => 'array<string,mixed>', 'virtual_features' => 'mixed', 'force_get_qid' => 'bool', 'filename' => 'string', 'colors' => 'array<string,float[]>', 'bvl' => 'string', 'compression' => 'int', 'group_path' => 'int[]', 'group_keys' => 'string[]', 'group_level' => 'int']
$setters
Array of attributes to setter functions (for deserialization of responses)
protected
static array<string|int, string>
$setters
= ['models' => 'setModels', 'query' => 'setQuery', 'action_uuid' => 'setActionUuid', 'action_version' => 'setActionVersion', 'format' => 'setFormat', 'parameters' => 'setParameters', 'virtual_features' => 'setVirtualFeatures', 'force_get_qid' => 'setForceGetQid', 'filename' => 'setFilename', 'colors' => 'setColors', 'bvl' => 'setBvl', 'compression' => 'setCompression', 'group_path' => 'setGroupPath', 'group_keys' => 'setGroupKeys', 'group_level' => 'setGroupLevel']
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|null $data = null ]) : mixed
Parameters
- $data : array<string|int, mixed>|null = null
-
Associated array of property values initializing the model
__toString()
Gets the string presentation of the object
public
__toString() : string
Return values
stringattributeMap()
Array of attributes where the key is the local name, and the value is the original name
public
static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed>getActionUuid()
Gets action_uuid
public
getActionUuid() : string|null
Return values
string|nullgetActionVersion()
Gets action_version
public
getActionVersion() : int|null
Return values
int|nullgetBvl()
Gets bvl
public
getBvl() : string|null
Return values
string|nullgetColors()
Gets colors
public
getColors() : array<string, array<string|int, float>>|null
Return values
array<string, array<string|int, float>>|nullgetCompression()
Gets compression
public
getCompression() : int|null
Return values
int|nullgetCompressionAllowableValues()
Gets allowable values of the enum
public
getCompressionAllowableValues() : array<string|int, string>
Return values
array<string|int, string>getFilename()
Gets filename
public
getFilename() : string|null
Return values
string|nullgetForceGetQid()
Gets force_get_qid
public
getForceGetQid() : bool|null
Return values
bool|nullgetFormat()
Gets format
public
getFormat() : string|null
Return values
string|nullgetFormatAllowableValues()
Gets allowable values of the enum
public
getFormatAllowableValues() : array<string|int, string>
Return values
array<string|int, string>getGroupKeys()
Gets group_keys
public
getGroupKeys() : array<string|int, string>|null
Return values
array<string|int, string>|nullgetGroupLevel()
Gets group_level
public
getGroupLevel() : int|null
Return values
int|nullgetGroupPath()
Gets group_path
public
getGroupPath() : array<string|int, int>|null
Return values
array<string|int, int>|nullgetModelName()
The original name of the model.
public
getModelName() : string
Return values
stringgetModels()
Gets models
public
getModels() : array<string|int, ModelIdentifier>|null
Return values
array<string|int, ModelIdentifier>|nullgetParameters()
Gets parameters
public
getParameters() : array<string, mixed>|null
Return values
array<string, mixed>|nullgetQuery()
Gets query
public
getQuery() : string|null
Return values
string|nullgetters()
Array of attributes to getter functions (for serialization of requests)
public
static getters() : array<string|int, mixed>
Return values
array<string|int, mixed>getVirtualFeatures()
Gets virtual_features
public
getVirtualFeatures() : mixed|null
Return values
mixed|nullisNullable()
Checks if a property is nullable
public
static isNullable(string $property) : bool
Parameters
- $property : string
Return values
boolisNullableSetToNull()
Checks if a nullable property is set to null.
public
isNullableSetToNull(string $property) : bool
Parameters
- $property : string
Return values
booljsonSerialize()
Serializes the object to a value that can be serialized natively by json_encode().
public
jsonSerialize() : mixed
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Returns data which can be serialized by json_encode(), which is a value of any type other than a resource.
listInvalidProperties()
Show all the invalid properties with reasons.
public
listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —invalid properties with reasons
offsetExists()
Returns true if offset exists. False otherwise.
public
offsetExists(int|string $offset) : bool
Parameters
- $offset : int|string
-
Offset
Return values
booloffsetGet()
Gets offset.
public
offsetGet(int|string $offset) : mixed|null
Parameters
- $offset : int|string
-
Offset
Attributes
- #[ReturnTypeWillChange]
Return values
mixed|nulloffsetSet()
Sets value based on offset.
public
offsetSet(int|null $offset, mixed $value) : void
Parameters
- $offset : int|null
-
Offset
- $value : mixed
-
Value to be set
offsetUnset()
Unsets offset.
public
offsetUnset(int|string $offset) : void
Parameters
- $offset : int|string
-
Offset
openAPIFormats()
Array of property to format mappings. Used for (de)serialization
public
static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>openAPITypes()
Array of property to type mappings. Used for (de)serialization
public
static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed>setActionUuid()
Sets action_uuid
public
setActionUuid(string|null $action_uuid) : self
Parameters
- $action_uuid : string|null
-
A stored query (BQL) action to run instead of
query
Return values
selfsetActionVersion()
Sets action_version
public
setActionVersion(int|null $action_version) : self
Parameters
- $action_version : int|null
-
The version of the stored action to run; its current version when absent
Return values
selfsetBvl()
Sets bvl
public
setBvl(string|null $bvl) : self
Parameters
- $bvl : string|null
-
Formats ifc and ifcxml, instead of colors; a BVL text: the export keeps the selected objects it shows (begin it with
SHOW;to keep them all) and writes the colours it gives them
Return values
selfsetColors()
Sets colors
public
setColors(array<string, array<string|int, float>>|null $colors) : self
Parameters
- $colors : array<string, array<string|int, float>>|null
-
Formats ifc and ifcxml; the objects' colours, written as IfcStyledItems
Return values
selfsetCompression()
Sets compression
public
setCompression(int|null $compression) : self
Parameters
- $compression : int|null
-
Output format of the JSON results. 0 (default): plain output, each object contains readable values such as qid and type. 1: compact output, version UUIDs and entity types are returned once in top-level vids/types arrays, and objects reference them by index (_v/_t) with _o as the object id. Only use 1 when you explicitly want the compact format, for example to reduce response size
Return values
selfsetFilename()
Sets filename
public
setFilename(string|null $filename) : self
Parameters
- $filename : string|null
-
The file name of the Content-Disposition, for the formats csv, xlsx, ifc and ifcxml
Return values
selfsetForceGetQid()
Sets force_get_qid
public
setForceGetQid(bool|null $force_get_qid) : self
Parameters
- $force_get_qid : bool|null
-
Format json; add the
qidof each object to its record, also when the query does notGETit
Return values
selfsetFormat()
Sets format
public
setFormat(string|null $format) : self
Parameters
- $format : string|null
-
Absent, the Accept header decides, and json when it names none of these.
json: the records (application/json);count:{count}(application/json);qids:{qids: {version uuid: [oid]}}(application/json);csv: the records as a table (text/csv);xlsx: the same as a spreadsheet;ifc: the matching objects as IFC STEP (application/ifc);ifcxml: the same as ifcXML (application/xml). The IFC formats are a download of model content and also need the model:read scope
Return values
selfsetGroupKeys()
Sets group_keys
public
setGroupKeys(array<string|int, string>|null $group_keys) : self
Parameters
- $group_keys : array<string|int, string>|null
-
The same slice as groupPath, addressed by value instead of by index - the
groupKeyof one group per level, as the slice records carry it. A key still names its group after the models change. Pass groupPath or groupKeys, not both
Return values
selfsetGroupLevel()
Sets group_level
public
setGroupLevel(int|null $group_level) : self
Parameters
- $group_level : int|null
-
Optional validation aid for groupPath and groupKeys: must equal the number of their entries (the nesting level of the returned groups)
Return values
selfsetGroupPath()
Sets group_path
public
setGroupPath(array<string|int, int>|null $group_path) : self
Parameters
- $group_path : array<string|int, int>|null
-
Slice mode for queries with a (multi-key) GROUP BY. Each entry addresses one group per nesting level, as an index into that level's groups (sorted by group key value). An empty array returns the level-0 groups. When entries remain below the addressed path, the response contains the next level's groups in a top-level "groups" array (same record shape as regular grouped results, plus "groupKey" and "groupValue" columns carrying the group's own key and display value); when the path consumes all group keys, the member objects of the addressed group are returned in "objects". Objects without a value for a level's group feature are grouped under a synthetic "[none]" group at that level, so every level fully partitions its parent. Group indices are stable for an identical model set and query. Without groupPath, a multi-key GROUP BY returns flat records, one per non-empty key combination (including [none] combinations), ordered by key 1, then key 2, etc.
Return values
selfsetModels()
Sets models
public
setModels(array<string|int, ModelIdentifier>|null $models) : self
Parameters
- $models : array<string|int, ModelIdentifier>|null
-
Models to query, by Version or Node identifier (a Node stands for its latest Version). An empty model set validates the query instead
Return values
selfsetParameters()
Sets parameters
public
setParameters(array<string, mixed>|null $parameters) : self
Parameters
- $parameters : array<string, mixed>|null
-
Values for the
$nameparameters of the query, by name. Every parameter of the query then needs a value. Not for formats ifc and ifcxml
Return values
selfsetQuery()
Sets query
public
setQuery(string|null $query) : self
Parameters
- $query : string|null
-
The query, in BQL. Pass either
queryoraction_uuid
Return values
selfsetters()
Array of attributes to setter functions (for deserialization of responses)
public
static setters() : array<string|int, mixed>
Return values
array<string|int, mixed>setVirtualFeatures()
Sets virtual_features
public
setVirtualFeatures(mixed|null $virtual_features) : self
Parameters
- $virtual_features : mixed|null
-
virtual_features
Return values
selftoHeaderValue()
Gets a header-safe presentation of the object
public
toHeaderValue() : string
Return values
stringvalid()
Validate all the properties in the model return true if all passed
public
valid() : bool
Return values
bool —True if all properties are valid
openAPINullables()
Array of nullable properties
protected
static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed>getOpenAPINullablesSetToNull()
Array of nullable field names deliberately set to null
private
getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool>setIfExists()
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
private
setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
- $variableName : string
- $fields : array<string|int, mixed>
- $defaultValue : mixed
setOpenAPINullablesSetToNull()
Setter - Array of nullable field names deliberately set to null
private
setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
- $openAPINullablesSetToNull : array<string|int, bool>