Download the PHP package userfrosting/support without Composer

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

Support module for UserFrosting 4

Latest Version PHP Version Join the chat at https://chat.userfrosting.com/channel/support Donate

Branch Build Coverage Style
master
develop  

This module contains support classes for UserFrosting and related modules.

Exception

userfrosting/support provides a number of custom exception types used by the main UserFrosting project:

HttpException

A large portion of UserFrosting's exception types inherit from the HttpException class.

The HttpException class acts like a typical exception, but it maintains two additional parameters internally: a list of messages (UserMessage) that the exception handler may display to the client, and a status code that should be returned with the response. As a simple example, consider the BadRequestException:

It defines a default message, 'Bad data!', that a registered exception handler can display on an error page or push to the alert stream. It also sets a default HTTP status code to return with the error response.

The default message can be overridden when the exception is thrown in your code:

Repository

userfrosting/support provides a generic Repository class that extends Laravel's base Repository, and on which various other UserFrosting components depend. For example, UserFrosting's config, translator, and Fortress schema all store their data in a UserFrosting Repository or child class.

The Repository class provides the following methods:

has(string $key)

Determine if the given configuration value exists.

get(string $key, mixed $default = null)

Get the specified configuration value.

set(array|string $key, mixed $value = null)

Set a given configuration value.

prepend(string $key, mixed $value)

Prepend a value onto an array configuration value.

push(string $key, mixed $value)

Push a value onto an array configuration value.

all()

Get all of the configuration items for the application.

mergeItems(string $key = null, mixed $items)

Merge a value or array of values into the repository using array_replace_recursive at the chosen key. If the $key is null, it will merge into the entire repository.

Loaders

Loader classes allow you to load repository data from multiple sources and merge them into a common data structure. The abstract class FileRepositoryLoader manages an ordered list of file paths. When the load method is called on a concrete implementation of FileRepositoryLoader, it will use the implementation of parseFile to read the contents of each file and merge them together, returning an array of the merged contents. The load method uses the array_replace_recursive function to perform this merge.

As an example, consider the YamlFileLoader implementation that loads two schema files:

To load and merge these two schema files into a Respository:

Path Builders

The abstract PathBuilder class uses an instance of the UniformResourceLocator to build a customized list of paths that can be passed into a Loader class.

For example, the StreamPathBuilder class takes a UniformResourceLocator and a stream path that has been registered with the locator, and returns a list of matching paths when you call the buildPaths method:

You can define other PathBuilder classes to customize the way this list of paths is constructed. Simply implement the buildPaths method, returning an array of generated paths in the order in which they should be loaded by a Loader class.

DotenvEditor

The DotenvEditor class provides an implementation of JackieDo Laravel-Dotenv-Editor package for UserFrosting. This can be used to read and write the .env configuration file (or files with same structure and syntax).

For complete usage of DotenvEditor class, see .

Style Guide

Testing


All versions of support with dependencies

PHP Build Version
Package Version
Requires illuminate/config Version ^5.8
jackiedo/dotenv-editor Version ~1.0.7
php Version >=7.1
userfrosting/uniformresourcelocator Version ~4.2.1 | ~4.3.0 | ~4.4.0 | ~4.5.0
symfony/yaml Version >=2.1
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 userfrosting/support contains the following files

Loading the files please wait ....