Download the PHP package flawlol/facade without Composer

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

Scrutinizer Code Quality Build Status Code Intelligence Status StyleCI

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Symfony - Facade

Author

Overview

This project provides a facade implementation for Symfony applications. The facade pattern is used to provide a simplified interface to a complex subsystem. In this case, the facade interacts with a container to manage dependencies.

Installation

To install the package, use Composer:

Usage

Defining a Facade

To define a facade, create a class that extends the Facade abstract class and implements the getFacadeAccessor method. This method should return the name of the service in the container that the facade will interact with.

Using the Facade

Once the facade is defined, you can use it to call methods on the underlying service.

Setting the Container

The container is automatically set during the bundle boot process. Ensure that your bundle extends FacadeBundle.

Exceptions

The package defines the following exceptions:

IDE Helper

The flawlol/facade-ide-helper package provides a command to generate IDE helper files for facades in Symfony. Its recommended to use this package to improve IDE autocompletion and static analysis.

Its also recommended to use the flawlol/facade-ide-helper package as a dev dependency.

The _ide-helper.php file provides helper classes to improve IDE autocompletion and static analysis. These helpers act as proxies to the actual service methods, making it easier to work with facades in your IDE.

To generate the facade helpers, run the following command:

Example

The following example demonstrates the helper class generated for a facade named Arr:

The Arr class provides a static method get to retrieve values from an array using a key path. This method acts as a proxy to the get method of the ArrayHelper service, allowing you to use the facade for cleaner and more readable code.

Real World Example

If you you have a service like this:

You can use the facade like this, and the IDE will provide autocompletion and type hints:

Inside the Facade Class

Make sure the Service is register in getFacadeAccessor method in the Facade class.

License

This project is open-source software licensed under the MIT license.


All versions of facade with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/framework-bundle Version >=6.4
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 flawlol/facade contains the following files

Loading the files please wait ....