Download the PHP package victorwesterlund/functionflags without Composer
On this page you can find all versions of the php package victorwesterlund/functionflags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download victorwesterlund/functionflags
More information about victorwesterlund/functionflags
Files in victorwesterlund/functionflags
Download victorwesterlund/functionflags
More information about victorwesterlund/functionflags
Files in victorwesterlund/functionflags
Vendor victorwesterlund
Package functionflags
Short Description An attempt to tame PHP constants for use as function/method flags
License GPL-3.0-only
Package functionflags
Short Description An attempt to tame PHP constants for use as function/method flags
License GPL-3.0-only
Please rate this library. Is it a good library?
Informations about the package functionflags
FunctionFlags
A library that aims to make it a bit easier to use PHP constants as function/method flags.
Flags can be defined and checked globally by calling FunctionFlags
's static methods.
Flags can also be scoped to a class by creating a new FunctionFlags
instance. Only flags defined in this instance will be matched
Installation
Requires PHP 8.1 or newer
-
Install composer package
-
Include FunctionFlags in your project
-
Define some flags (Using static approach for demo)
-
Add a function which accepts flags
- Use flags in function calls
Methods
Static | Description |
---|---|
FunctionFlags::define(string\|array) |
Flag(s) to define as string or array of string. This method must be called before using the flag(s). |
FunctionFlags::isset(constant) |
The constant you wish to check is set on your function or method call. |
Instanced | Description |
---|---|
new FunctionFlags(string\|array\|null) |
Flag(s) to define as string or array of string. This method must be called before using the flag(s). |
FunctionFlags->define(string\|array) |
Flag(s) to define as string or array of string. This method must be called before using the flag(s). |
FunctionFlags->isset(constant) |
The constant you wish to check is set on your function or method call. |
All versions of functionflags with dependencies
PHP Build Version
Package Version
No informations.
The package victorwesterlund/functionflags contains the following files
Loading the files please wait ....