Download the PHP package icecave/dialekt without Composer

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

Dialekt

This project has been deprecated by the authors. Use dialekt/dialekt instead.

Dialekt is a very simple language for representing boolean expressions of the form often used by search engines.

composer require icecave/dialekt

Rationale and Concepts

Dialekt was devised for specifing filters for lists of objects based on sets of human-readable "tags" or "labels". This PHP package provides an expression parser which parses Dialekt expressions into an abstract syntax tree, a list parser which parses lists of tags into arrays, and an evaluator which checks if a given set of tags matches a particular expression.

Additionally, the nodes of the abstract syntax tree implement the visitor pattern, allowing the creation of new algorithms that traverse the syntax tree. This could be used, for example, to generate an SQL query that finds entities with tags that match the expression.

Syntax

Below is an example of a Dialekt expression showing the available language features. You can see how this expression is parsed using the online demo.

In the above example, foo, bar, baz, qux and "doom hammer" are examples of tags. The tag is the most basic syntactic element of an expression. An expression is composed of one or more tags, and the logical operators AND, OR and NOT. The logical operators are case-insensitive.

Tags may be formed by any non-whitespace characters except the parentheses and asterisk characters. Tags may optionally be enclosed in double-quotes, as the doom hammer tag has been in the example above. Doing so allows the inclusion of parentheses and whitespace characters. Tags must also be enclosed in double-quotes if they are one of the reserved words AND, OR or NOT. Inside a quoted tag the backslash character provides escaping functionality similar to a double-quoted PHP string.

Implicit AND operator

When one tag is directly adjacent to another (as foo and bar are above) they are treated equivalent to an AND, thus the expression foo bar baz is equivalent to foo AND bar AND baz.

Grouping and operator precedence

Sub-expressions can be grouped using parenthesis to control evaluation order, as baz and qux have been in the example above.

When parenthesis are not present, the AND operator has higher precedence than OR such that foo OR bar AND baz is equivalent to foo OR (bar AND baz).


All versions of dialekt with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
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 icecave/dialekt contains the following files

Loading the files please wait ....