Download the PHP package beeblebrox3/caster without Composer

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

Maintainability Rating Security Rating Vulnerabilities Coverage

Caster

PHP Library to cast arrays of values

Requirements

Usage

Basic example:

The $types parameter specifies how the $input values should be transformed. You do this specifying an array of rules to be applyied. A rule is identified by a string.

You can also apply multiple rules to the same value:

Rules can have arguments:

You can use nested arrays too:

Available rules

to pass options you don't use their names, but pass the values in the displayed order. Example: 'a' => 'bool|1'. arguments with * are mandatory

Rule Arguments Details
bool nullIfEmpty* cast to boolean. If nullIfEmpty is 1, cast empty strings and null to null, else cast to false
date_format output format*
input format
format the given date to an specific format. You can also specify the format of the input date
float precision
round mode
cast to float and optionally round the value using precision and round mode (using the round function)
integer cast to integer
lpad length
str
pad the string on the left site to length length using str to fill
rpad length
str
pad the string on the right site to length length using str to fill
string max length casto so string, optionally limiting the string size to max length (using substr)

Custom Rules

You can create your own rules with a class implementing the Beeblebrox3\Caster\Rules\IRule interface:

The PipeRule will only return the same input.

Function as custom rule

new on version 0.1.0

Now you created the same pipe rule as before, but without the class.

Changelog


All versions of caster with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.0
adbario/php-dot-notation Version ^2.0
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 beeblebrox3/caster contains the following files

Loading the files please wait ....