Download the PHP package indgy/philter without Composer

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

Philter Logo

A PHP fluent input sanitiser.

Philter accepts untrusted input, passes it through some filters and returns it back to you. It is not a substitution for validation.

Installation

Copy the src/Philter.php file to your project, or install using composer:

Getting started

Create a new Philter instance passing in the untrusted input, then combine filters for the untrusted input to pass through and finally call toBool(), toFloat(), toInt() or toString() to get the filtered and now trusted input.

There is also a handy shortcut function to return a new Philter instance:

Available filters

allow(String $chars) - Allow only the characters in \$chars

alpha() - Allow only a-z

alphanum() - Allow only a-z and 0-9

ascii() - Allow only ASCII chars (32-127), transliterating where possible

between(Int $min, Int $max) - Allow values between min and max inclusive

contains(String $match) - Allow values containing \$match

cut(Int $length) - Cut string to \$length

digits() - Allow only 0-9

in(Array $items) - Allow if in \$items

max(Int $max) - Allow only if less than or equal to \$max

min(Int $min) - Allow only if greater than or equal to \$min

numeric() - Allow only if numeric, e.g. currency string

trim() - Trim characters from beginning and end (see also ltrim() and rtrim())

utf8() - Convert to UTF-8 transliterating where possible

Refer to the Reference for more detail on the filters.

Custom filters

Define custom filters using the apply() method with a closure. The closure will be passed the current input value and expects it, or null to be returned.

Documentation

Refer to the user guide or browse the API .


All versions of philter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.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 indgy/philter contains the following files

Loading the files please wait ....