Download the PHP package donatj/php-dnf-solver without Composer

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

PHP DNF Solver

Latest Stable Version License ci.yml Coverage Status

PHP DNF (Disjunctive Normal Form) Signature Compatibility Solver - see: https://wiki.php.net/rfc/dnf_types

Requirements

Installing

Install the latest version with:

Examples

Example Parameter Satisfaction Check

Outputs:

Example DNF Building

Outputs:

Documentation

Class: \donatj\PhpDnfSolver\DNF

Method: DNF::getFromReflectionType

Helper to convert a ReflectionType into it's DNF representation

Example sources include

Method: DNF::reflectionTypeSatisfiesReflectionType

Helper to quickly check if a ReflectionType satisfies another ReflectionType

Parameters:

Method: DNF::getFromVarType

Helper to quickly get a DNF representation of a (ReflectionParameter or ReflectionProperty)'s return type


Method: DNF::getFromReturnType

Helper to quickly get a DNF representation of a ReflectionFunctionAbstract (ReflectionFunction /
ReflectionMethod)'s return type

Class: \donatj\PhpDnfSolver\Exceptions\InvalidArgumentException

Class: \donatj\PhpDnfSolver\Exceptions\LogicException

Class: \donatj\PhpDnfSolver\Types\AndClause

Represents an "and clause" - a set of types which must all be satisfied - e.g. "A&B&C"

Method: AndClause->__construct

Parameters:

Method: AndClause->dnf

Return the canonical string representation of the DNF representation of this type


Method: AndClause->isSatisfiedBy

Tests if this type is satisfied by the given type

For example, if this type is "A|(B&C)" and the given type matches just "A", this method returns true.
If the given type matches just "B", this method returns false.
If the given type matches "B&C", this method returns true.


Method: AndClause->count

Returns the number of types in this DNF type


Method: AndClause->getTypes

Returns:

Class: \donatj\PhpDnfSolver\Types\BuiltInType

Represents a "built in type" as defined by ReflectionNamedType::isBuiltin()

This includes:

Method: BuiltInType->__construct

Parameters:

Method: BuiltInType->dnf

Return the canonical string representation of the DNF representation of this type


Method: BuiltInType->getTypeName

Returns the fully qualified type name of this type


Method: BuiltInType->isSatisfiedBy

Tests if this type is satisfied by the given type

For example, if this type is "A|(B&C)" and the given type matches just "A", this method returns true.
If the given type matches just "B", this method returns false.
If the given type matches "B&C", this method returns true.


Method: BuiltInType->count

Always 1 for singular types

Returns the number of types in this DNF type

Class: \donatj\PhpDnfSolver\Types\CallableType

Represents a "callable" type

This includes:

Method: CallableType->dnf

Return the canonical string representation of the DNF representation of this type


Method: CallableType->isSatisfiedBy

Tests if this type is satisfied by the given type

For example, if this type is "A|(B&C)" and the given type matches just "A", this method returns true.
If the given type matches just "B", this method returns false.
If the given type matches "B&C", this method returns true.


Method: CallableType->getTypeName

Returns the fully qualified type name of this type


Method: CallableType->count

Always 1 for singular types

Returns the number of types in this DNF type

Class: \donatj\PhpDnfSolver\Types\OrClause

Represents a "or" clause - a set of types where any one of them must be satisfied - e.g. "A|B|(C&D)"

Method: OrClause->__construct

Parameters:

Method: OrClause->dnf

Return the canonical string representation of the DNF representation of this type


Method: OrClause->isSatisfiedBy

Tests if this type is satisfied by the given type

For example, if this type is "A|(B&C)" and the given type matches just "A", this method returns true.
If the given type matches just "B", this method returns false.
If the given type matches "B&C", this method returns true.


Method: OrClause->count

Returns the number of types in this DNF type


Method: OrClause->getTypes

Returns:

Class: \donatj\PhpDnfSolver\Types\UserDefinedType

Represents a "user defined type" - a class, interface, or trait, etc.

Method: UserDefinedType->__construct

Parameters:

Throws: \donatj\PhpDnfSolver\Exceptions\InvalidArgumentException - if the user defined type does not exist after triggering registered autoloaders


Method: UserDefinedType->dnf

Return the canonical string representation of the DNF representation of this type


Method: UserDefinedType->getTypeName

Returns the fully qualified type name of this type

Returns:

Method: UserDefinedType->isSatisfiedBy

Tests if this type is satisfied by the given type

For example, if this type is "A|(B&C)" and the given type matches just "A", this method returns true.
If the given type matches just "B", this method returns false.
If the given type matches "B&C", this method returns true.


Method: UserDefinedType->count

Always 1 for singular types

Returns the number of types in this DNF type


All versions of php-dnf-solver with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1.0 || ^8.2.0 || ^8.3.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 donatj/php-dnf-solver contains the following files

Loading the files please wait ....