PHPackages                             xtompie/typed - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. xtompie/typed

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

xtompie/typed
=============

Typed is a library that provides a set of classes that allow you to define types for your variables.

5.0(11mo ago)05.0k↓39.5%MITPHP

Since Dec 20Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/xtompie/typed)[ Packagist](https://packagist.org/packages/xtompie/typed)[ RSS](/packages/xtompie-typed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (20)Used By (0)

Typed
=====

[](#typed)

Primitives as Typed Objects. Library that maps pritmitve types into typed objects. Can be used to maps request/input into objects of defined classes. Gives [ErrorCollection](https://github.com/xtompie/result/blob/master/src/ErrorCollection.php) on fail.

- [Typed](#typed)
    - [Requiments](#requiments)
    - [Installation](#installation)
    - [Docs](#docs)
        - [Basic](#basic)
        - [Class](#class)
        - [ArrayOf](#arrayof)
        - [Source](#source)
        - [Only](#only)
        - [Callback](#callback)
        - [Factory](#factory)
        - [Creating assert](#creating-assert)
        - [Others](#others)
        - [Inject](#inject)
        - [Limitations](#limitations)

Requiments
----------

[](#requiments)

PHP &gt;= 8.0

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

[](#installation)

Using [composer](https://getcomposer.org/)

```
composer require xtompie/typed
```

Docs
----

[](#docs)

### Basic

[](#basic)

```
