Download the PHP package effectra/facade without Composer

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

Facade Class

The Facade class is a utility class that provides a simplified interface to access classes or services in your PHP applications.

Installation

The Facade class is a standalone class and doesn't require any installation. You can simply include the class file in your project.

Usage

To use the Facade class, follow these steps:

  1. Extend the Facade class with your custom facade class.
  2. Implement the getFacadeAccessor() method in your custom facade class.
  3. Optionally, set the resolved instance or container using the setResolvedInstance() or setContainer() method respectively.
  4. Access the methods of the underlying class or service using the static methods of your custom facade class.

Here's an example:

In this example, we've created a custom facade class MyFacade by extending the Facade class. The getFacadeAccessor() method in MyFacade returns the class name of MyService that we want to access using the facade.

By setting the resolved instance using setResolvedInstance(), we directly provide an instance of MyService to the facade. This allows us to access the methods of MyService using the static methods of MyFacade.

You can also use a container instead of setting the resolved instance directly. To do so, create a container, bind the class name to a key in the container, and set the container using setContainer().

In this example, we've used a simple Container class to bind the class name of MyService to the key 'myService'. By setting the container using setContainer(), the Facade class resolves the instance from the container when the static method is called.

Make sure to replace 'MyService' and 'someMethod()' with the actual class and method names you're using in your application.

Contributing

Contributions are welcome! If you find any issues or would like to add new features or improvements, please open an issue or submit a pull request.

Before contributing, please make sure to review the contribution guidelines.

License

This class is open-source and available under the MIT License.


All versions of facade with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
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 effectra/facade contains the following files

Loading the files please wait ....