PHPackages                             andrew-gos/class-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. andrew-gos/class-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andrew-gos/class-builder
========================

Advanced library for building objects from arrays or other types

1.3.4(3mo ago)22.6k↓37.5%1MITPHPPHP &gt;=8.2

Since Jul 3Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/CiBeRHeMuL/ClassBuilder)[ Packagist](https://packagist.org/packages/andrew-gos/class-builder)[ RSS](/packages/andrew-gos-class-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (14)Used By (1)

Class Builder Library
=====================

[](#class-builder-library)

**Version 1.3.0**

Description
-----------

[](#description)

This library provides functionality to build objects from arrays or scalars.

The library allows the construction of interfaces, abstract classes, arrays of objects. It also supports the construction of object parameters whose type is an array with typed elements. There is the possibility to build variadic parameters from arrays. Additionally, you can build classes with a single required parameter from scalar values. Parameters can also be assembled where the type is an intersection or union of types.

The library gathers information about object parameters from the constructor's parameters.

Contacts
--------

[](#contacts)

If you encounter a bug or have an idea, please write to [Gostev71@outlook.com](Gostev71@outlook.com) and type `Telegram Library Bug` or `Telegram Library Idea` in the email header.

Installation
------------

[](#installation)

To install the library, use Composer:

```
composer require andrew-gos/class-builder
```

Simple example
--------------

[](#simple-example)

To build an object, write:

```
