Download the PHP package wpbones/flags without Composer

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

Flags for WP Bones

[![Latest Stable Version](https://poser.pugx.org/wpbones/flags/v/stable?style=for-the-badge)](https://packagist.org/packages/wpbones/flags)   [![Latest Unstable Version](https://poser.pugx.org/wpbones/flags/v/unstable?style=for-the-badge)](https://packagist.org/packages/wpbones/flags)   [![Total Downloads](https://poser.pugx.org/wpbones/flags/downloads?style=for-the-badge)](https://packagist.org/packages/wpbones/flags)   [![License](https://poser.pugx.org/wpbones/flags/license?style=for-the-badge)](https://packagist.org/packages/wpbones/flags)   [![Monthly Downloads](https://poser.pugx.org/wpbones/flags/d/monthly?style=for-the-badge)](https://packagist.org/packages/wpbones/flags)

Flags for WP Bones is a PHP package designed for the WP Bones framework, allowing you to enable or disable features in plugins using YAML configuration files. This approach simplifies feature management and makes the plugin more flexible and easy to configure, even for non-technical users.

Key features

Installation

You can install third party packages by using:

I advise to use this command instead of composer require because doing this an automatic renaming will done.

You can use composer to install this package:

You may also to add "wpbones/flags": "~0.7" in the composer.json file of your plugin:

and run

YAML file example

You can find more information about the YAML syntax in the Symfony documentation.

YAML file configuration path

You can creare your own YAML file everywhere in your plugin, but I suggest to create it in the config directory of your plugin.

The default path and filename is:

Set the flags path in the plugin configuration

You can set the path and filename in the plugin configuration by adding the following line in the config/plugin.php file of your plugin:

Basic usage

You can use the wpbones_flags helper function to get the value of a flag:

The first parameter is the flag name, and the second parameter is the default value if the flag is not found.

You may also use the class directly:

or by using the static method:

Set the flags path by method

You may also set/change the path by using:

or the fluent method withPath:

by using the class directly:

or by using the static method:


All versions of flags with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
symfony/yaml Version ^5.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 wpbones/flags contains the following files

Loading the files please wait ....