Download the PHP package topolis/filter without Composer

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

Filter

A secure filter class to wrap access to variables from untrusted sources like $_REQUEST or $_COOKIE.

Filter a value

The Filter::filter() method filters the given value and returns the sanitized result. If value is an array, the filter function is applied to all elements of the array, even recursive.

Validate a value

The Filter::validate() method validates the given value and returns false if invalid. If value is an array, the validation check is applied to all elements of the array, the function will return false if any of the validated values inside the array is invalid.

Using filter options

You can set special options for the used filter as the fourth method parameter. Available options can be seen below. Most filters use an array of $key => $value pairs to configure their behaviour.

Using multiple filters

You can use multiple filters and options in a queue and pass your value through them.

Using multiple values

You can use an array or multi-dimensional array of values with your filters and options. The test will be appied to the non-array values inside the array. Depending on the type option, the value has to be of this nature:

If no type is specified, anything is valid.

Available Filters

You can specify any of the following filters for Filter. The name of the filter allways is identical to the first part of it's class name lowercase. (Example: "plain" means class "PlainFilter" in file "PlainFilter.php".

Boolean

Filters a value and returns it as a boolean value of true or false

Options

DataTime

Validates or returns a formatted date-time string.

Options

Email

Validates or filters a email value. (No options)

Enum

Allow only values from a fixed set of options.

Options

Json

Validate and optionally unserialize a inpout string with a JSON value.

Options

Money

This filter is a shorthand version of the number filter. It is preconfigured with defaults usable for money. (See @Number for options)

Number

Filter or validate numbers with or without decimals. Note: The result will be a double, regardless of decimal counts.

Options

Passthrough

This filter allows any input without modification. Be carefull!

Options

Path

A shorthand version of the PlainExt filter, preconfigured to allow any character usable in a file path.

Options

PlainExt

A text filter, that allows certain characters, with preconfigured selectable charactersets.

Options

Plain

A simple text filter that only allows basic letters and numbers (A-Z a-z 0-9).

Regexp

A filter that validates according to a regular expession.

Options

Strip

A text filter that strips out html tags.

Options

Test

A simple filter usable for unit tests. It tests input against one or more expected values.

Options

Url

Check if input is a valid URL according to the parse_url method and configurable checks.

Options


All versions of filter 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 topolis/filter contains the following files

Loading the files please wait ....