Download the PHP package omaralalwi/php-builders without Composer

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

PHP Builders

Latest Version License

PHP Builders is a lightweight PHP library designed to simplify the implementation of the Builder design pattern in PHP applications.


Table of Contents


Installation

Install the package via Composer using the following command:


Usage

Note: if you not use any PHP frameworks like (symfony,laravel,codeigniter,Yii,cakePHP..etc), you should add this line:

First Way

By Extending FluentBuilder in Builder Class

The FluentBuilder class integrates all available traits, enabling you to utilize all package features by simply extending this class.

second Way

By Include Traits

simplify you can achieve same result by include Buildable, Arrayable, Objectable, Jsonable traits directly in builder class, without extending the FluentBuilder class.

cast Builder Class

use UserBuilder as following:

then cast it to needed type as following:

Return as Array

Convert the built instance to an array using the toArray() method:

Return as Object

Convert the built instance to an object using the toObject() method:

Return as JSON

Convert the built instance to JSON using the toJson() method:


Custom Execution Logic

Note: Traits like Arrayable, Objectable, and Jsonable can also be included in your builder class as needed if you choose not to extend FluentBuilder.


Contributing

Contributions are welcome! To propose improvements or report issues, please open an issue or submit a pull request on the GitHub repository.


Security

If you discover any security-related issues, please email the author at: [email protected].


License

This project is open-source and licensed under the MIT License.


All versions of php-builders with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 omaralalwi/php-builders contains the following files

Loading the files please wait ....