PHPackages                             awaitcz/di-attribute - 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. awaitcz/di-attribute

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

awaitcz/di-attribute
====================

Automatic class registration using a simple attribute for Nette

1.1(1y ago)013PHP

Since Jun 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/awaitcz/di-attribute)[ Packagist](https://packagist.org/packages/awaitcz/di-attribute)[ RSS](/packages/awaitcz-di-attribute/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

DI Attribute
============

[](#di-attribute)

Automatic class registration using a simple attribute for Nette.

Setup
-----

[](#setup)

DiAttibute is available on composer:

```
composer require awaitcz/di-attribute
```

At first register compiler extension.

```
extensions:
	diAttribute: Awaitcz\DiAttribute\DI\DiAttributeExtension
```

Configuration
-------------

[](#configuration)

```
diAttribute:
	# Paths to scan for classes
	paths:
		- %appDir%/model
	# If you need to exclude some namespaces or classes
	excludes:
		- App\Model\IgnoreMe
```

Usage
-----

[](#usage)

```
