Download the PHP package medz/phpwind without Composer

On this page you can find all versions of the php package medz/phpwind. 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 phpwind

✨ OvO ✨

OvO is a Dart-first schema declaration and validation library.

Introduction

OvO is a Dart-first schema declaration and validation library. We use the technical term "Schema" to define any data type, from simple single data (for example: string/int, etc.) to complex nested Map.

OvO is designed to be as user-friendly and developer-friendly as possible, with the goal of eliminating tedious type checking and object deserialization. It is easy to compose complex data structure validation using simple declaration validation.

several important aspects

Sponsors

I am very grateful and encouraged for any level of sponsorship, which will help me continue to develop and maintain this project.

Installation

We are more aggressive and use higher versions of Dart stable versions as much as possible.

Install from command line

Install from pubspec.yaml

Basic Usage

Create a simple string schema:

Creating an JSON schema:

Types

OvO provides type validation with dependent type parameters, and also built-in some common types. You can declare a type validation by OvO<T>, where T is a type parameter and can be any type.

Let's try to create a String type validation:

Or, we create a validation of Record type that is not built-in:

Of course, you can also use it to validate a custom class:

Basic type validation depends on the built-in is keyword in Dart, which is fully capable of most type validation. However, if you need more complex type validation, you can use the constructor of OvO<T> to create a custom type validation.

Any

Any type validation can accept a non-null value of any type. It is an alias of OvO<Object>.

Array

Array type validation can accept an iterable value (for example: List, Set, Iterable, etc.). It is not an alias of OvO<Iterable<T>>, but a specific type validation.

Array accepts a parameter of type OvO<T> to validate each element in the array.

.min/.max/.size

.min/.max/.size have the same parameters and type signatures, and they all accept a parameter of type int to validate the length of the array.

.unique

.unique validates that the elements in the array must be unique, similar to Set in Dart.

Boolean

Boolean type validation can accept a value of type bool. It is an alias of OvO<bool>.

另外,他还有两个额外的扩展方法:

In addition, it has two additional extension methods:

Of course, you can use OvO<bool> instead of Boolean type validation, but Boolean type validation is more semantic.

Number

Number type validation can accept a value of type num. It is an alias of OvO<num>.

If you need to validate an integer, you can use the Integer type validation, which is an alias of OvO<int>. To validate a floating-point number, you can use the Double type validation, which is an alias of OvO<double>.

Integer and Double are both subtypes of Number:

OvO<num> also contains some additional methods:

String

String type validation can accept a value of type String. It is an alias of OvO<String>.

OvO<String> also contains some additional methods:

Object

Object type validation can accept a value of type Map. It is an implementation of OvO<Map<String, T>>.

Of course, if you just want to simply validate a value of type Map<K, T>, you can use OvO<Map<K, T>> instead of Object type validation.

Functional

.nullable

The .nullable method can convert a type validation to a type validation that accepts null.

.refine

.refine is a method that allows you to customize the validation. It accepts a validation function of FutureOr<bool> Function(T data) to facilitate validation according to the actual situation.

It is worth noting that many of the built-in extension methods are implemented based on the .refine method.

.transform

.transform is a method that allows you to customize the method of converting data types. It works on the principle of Onion Model.

Pre-transformation

Pre-transformation allows you to pre-process the raw data to be parsed, and then hand it over to the next converter, and finally hand it over to the type validator for verification:

Post-transformation

Using the next parameter in the callback, you can perform post-transformation of the data after the type validator is verified successfully:

.withDefault

.withDefault allows a nullable value T? to be replaced with a default value T when the value is null.

As you can see, the .withDefault method will automatically attach the .nullable method, so you don't need to call the .nullable method manually.

Compositions

AnyOf (OR)

AnyOf type validation can accept any of the multiple type validations.

AllOf (AND)

AllOf type validation can accept all types in multiple type validations.

OneOf (XOR)

OneOf type validation can accept one type in multiple type validations. If multiple validations match, an exception is thrown.

Not (NOT)

Not type validation can accept any type validation, but if the specified type validation is matched, an exception is thrown.

Const

Const type validation can accept a constant value.

Using Const we can implement string literals in JSON:

Used in conjunction with conversion, we can implement Enum type validation:


All versions of phpwind with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
algolia/algoliasearch-client-php Version ^1.27
fideloper/proxy Version ^4.0
laravel/framework Version 5.7.*
laravel/scout Version ^6.1
laravel/tinker Version ^1.0
overtrue/easy-sms Version ^1.1
tymon/jwt-auth Version ^1.0.0-rc.3
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 medz/phpwind contains the following files

Loading the files please wait ....