Skip to content

Releases: phpgt/Input

Improve API design while moving towards FileUpload support

23 Feb 19:25
21d2477

Choose a tag to compare

Two issues have come together to drastically improve the library:

FileUpload support is required now that key-value-pairs work.
An improvement to how callbacks are triggered required refactoring.
This update includes a large refactor compromising mainly of the following:

Classes broken out into more granular parts.
Namespaces bundle similar classes together.
All user input types, including FileUpload, extend common base class AbstractInputData.
All values of user input are handled as InputDatum instances.

API changes

02 Dec 15:55

Choose a tag to compare

API changes Pre-release
Pre-release

As unit test coverage increases, APIs change.

The Input class itself shares its data access methods with the InputData class for ease of use and quick on-the-fly data access.

Accessing data is done using ArrayAccess now, rather than property access, due to the StyleGuide specifying "Only properties should be used when a predefined set of data attributes can be determined".

Input class fully tested

01 Dec 15:26

Choose a tag to compare

Pre-release

The basics are working. The Input class can be constructed from the $_GET, $_POST and $_FILES arrays. with(), without(), withAll() have been tested when calling them on the Input class themselves, and the correct callbacks are called.