Download the PHP package eventjet/ausdruck without Composer

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

Ausdruck

A small expression engine for PHP.

Quick start

Documentation

Accessing scope variables

Syntax: varName:type

Scope variables are passed from PHP when it calls evaluate() on the expression:

Examples

foo:int, foo:list<string>

See Types

Literals

Operators

Both operands must be of the same type.

Operator Description Example Note
=== Equality foo:string === "bar"
- Subtraction foo:int - bar:int Operands must be of type int or float
> Greater than foo:int > bar:int Operands must be of type int or float
\|\| Logical OR foo:bool \|\| bar:bool Operands must be of type bool
&& Logical AND foo:bool && bar:bool Operands must be of type bool

Where's the rest? We're implementing more as we need them.

Types

The following types are supported:

Functions

Syntax: target.functionName:returnType(arg1, arg2, ...)

The target can be any expression. It will be passed as the first argument to the function.

Example

haystack:list<string>.contains:bool(needle:string)

Built-In Functions

Function Description Example
count Returns the number of elements in a list foo:list<string>.count:int()
contains Returns whether a list contains a value foo:list<string>.contains:bool("bar")
head Returns the first element of a list as an Option foo:list<string>.head:Option<string>()
isSome Takes an Option and returns whether it is Some foo:Option<int>.isSome:bool()
map Returns a new list with the results of applying a function foo:list<int>.map:list<int>(\|i\| i:int - 2)
some Returns whether any element matches a predicate foo:list<int>.some:bool(\|item\| item:int > 5)
substr Returns a substring of a string foo:string.substr:string(0, 5)
tail Returns all elements of a list except the first foo:list<string>.tail:list<string>()
take Returns the first n elements of a list foo:list<string>.take:list<string>(5)
unique Returns a list with duplicate elements removed foo:list<string>.unique:list<string>()

Custom Functions

You can pass custom functions along with the scope variables:

The target of the function/method call (foo:string in the example above) will be passed as the first argument to the function.

Lambdas

Syntax: |arg1, arg2, ... | expression

To access an argument, you must specify its type, just like when accessing scope variables.

Example

|item| item:int > 5


All versions of ausdruck with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-ctype Version *
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 eventjet/ausdruck contains the following files

Loading the files please wait ....