Skip to content

Query Arguments array should be converted to a type safe object #124

@ernestmarcinko

Description

@ernestmarcinko

Sor far the query arguments had been passed as an array, which lacks any type safety from development standpoint. This is passed to the asp_query_args hook.

A new data model should be introduced for this, which implements the ArrayAccess interface in a way, that the properties still can be accessed and modified as array elements.

  • Make an ArrayAccess implementation for the SearchQueryArgs model
  • Move all items from SearchQuery::$defaults to SearchQueryArgs model
  • Implement the new model into SearchQuery
  • Check all arguments one-by-one for any type safety issues
  • Test extensively on all different configurations
  • Update asp_query_args documentation with type safe declarations
  • Update ASP_Query documentation

Metadata

Metadata

Labels

changeChange in a featurefeatureNew feature or request

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions