Download the PHP package rhinox/input-data without Composer

On this page you can find all versions of the php package rhinox/input-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package input-data

InputData

PHP Version

InputData is a PHP library that helps parse user input data, or data from sources that could potentially be invalid, changed, or corrupted. It parses data based on expectations with sensible defaults and robust type casting. It does not replace validation or sanitization, but provides best-effort parsing with predictable behavior.

Features

Installation

Quick Start

Use Cases

User Input Processing

API Response Handling

File Processing

API Reference

All methods accept a key parameter and optional default value. Keys support dot notation for nested data access.

Type Casting Methods

string()

Cast value to string. Non-string values are converted using PHP's string casting rules.

int()

Cast value to integer. Non-numeric values return the default.

decimal()

Cast value to float/decimal.

bool()

Cast value to boolean.

dateTime()

Parse value as DateTime with optional timezone.

Data Structure Methods

arr()

Get array data as new InputData instance.

object()

Get object data, converting arrays to objects when needed.

json()

Parse JSON string into InputData instance.

raw()

Get raw value without type casting.

Utility Methods

exists()

Check if a key exists (supports dot notation).

isEmpty(), isArray(), count()

Check data state and get count.

Static Factory Methods

JSON Processing

jsonDecode()

Parse JSON string, throws JsonException on invalid JSON.

tryJsonDecode()

Parse JSON string, returns empty InputData on invalid JSON.

jsonDecodeFile()

Read and parse JSON file, throws FileReadException or JsonException on errors.

tryJsonDecodeFile()

Read and parse JSON file, returns empty InputData on any error.

Data Modification

Two variants are available for modifying data:

MutableInputData

ImmutableInputData

Modification Methods

extend()

Recursively merge arrays into existing data.

set()

Set value at path (supports dot notation).

unset()

Remove value at path (supports dot notation).

filter()

Filter data using callback. Default callback removes null values.

filterRecursive()

Recursively filter nested data.

map()

Transform values using callback.

mapRecursive()

Recursively transform nested data.

values()

Re-index array to sequential numeric keys.

merge()

Merge with another array or InputData instance.

Advanced Features

Dot Notation

Access nested data using dot-separated keys:

Array Access Interface

InputData implements ArrayAccess for convenient access:

Iteration

InputData implements IteratorAggregate:

Find Method

Search for items matching criteria:

Extending InputData

Create custom parsers by extending the base class:

Development

Requirements

Development Tools

The project uses modern PHP development tools:

Running Tests

Code Quality

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run the quality assurance suite (composer qa)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Please ensure all tests pass and maintain 100% code coverage.

License

This project is licensed under the MIT License - see the LICENSE file for details.


All versions of input-data with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rhinox/input-data contains the following files

Loading the files please wait ....