Download the PHP package browserfs/runtime without Composer

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

Runtime Types

A PHP library used to test at runtime if a value matches a pattern ( or a type ).

Build Status

Why?

How many times, and how many lines of code you had to write in order to check the type of data and the values in data provided from webservices, user input, forms, or parsed files?

Example 1:

Example 2:

How?

Example 1 could be wrote, in a decoupled manner, as:

defs/Webservices.defs

SomeClassFile.php

In the above example, we tested if the $result variable is validatable by the validator called "WebserviceResponse". If any errors are encountered by the validator, in optional argument $errors, the testing system is storing all the errors occured.

Example 2 could be wrote as follows:

defs/SampleRequest.type

SampleClass.php

Data types and validators

There are built-in data types, and user defined data types. User defined data types are wrote in a definition file ( extension ".types" ). The library creates a environment ( called runtime ), where it store the data types and the validators parsed from the ".types" files you wrote.

After that, the flow is easy, you can test:

Built-in types

This library defines the following primitives built in types:

User defined types

Having the built-in types, we can create user-defined types ( complex types ) in a .types file, by respecting the following syntax:

TypeName, OtherTypeName, key_name_1, key_name_2, index_key must be valid identifier names.

Examples:

Validators

After we defined our data types, we need a mechanism to validate the values we store in them. For this case, we implemented Validators.

The syntax of a validator is as follows:

Operators of a validator:

@min -> used to test if a value is >= than the argument

@max -> used to test if a value is <= than the argument

@minlength -> used to test if the length of a value is >= than the argument

@maxlength -> used to test if the length of a value is <= than the argument

@length -> used to test if the length of a value is = with the argument

@is -> used to test if a value is === with the argument

@isnot -> used to test if a value is !== with the argument

@in -> used to test if a value is member of a set of values ( in this case the argument is a set of values )

@nin -> used to test if a value is not member of a set of values ( in this case the argument is a set of values )

@match -> used to test if a value matches against a regular expression

@require -> used to require other validators at current position

@instanceof -> used to test if current object or property is of type of the argument of the operator

@index -> used to specify aditional operators on a validator

@oneof -> used to create variant validators


All versions of runtime with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
browserfs/base Version 0.*
browserfs/string Version >=1.0.4
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 browserfs/runtime contains the following files

Loading the files please wait ....