PHPackages                             pugx/aop - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. pugx/aop

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

pugx/aop
========

Aspect-oriented logging for PHP.

0.0.1(12y ago)16173MITPHP

Since May 31Pushed 12y ago3 watchersCompare

[ Source](https://github.com/pugx/aop)[ Packagist](https://packagist.org/packages/pugx/aop)[ RSS](/packages/pugx-aop/feed)WikiDiscussions master Synced 2mo ago

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

PUGX/AOP
========

[](#pugxaop)

[![Build Status](https://camo.githubusercontent.com/bd5445da324e8d74a6bc7b6083ebefb7f378814ea02a99ff07bf58898727e7f5/68747470733a2f2f7472617669732d63692e6f72672f505547582f616f702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/PUGX/aop)

This library aims to provide a very simple and lightweight support for Aspect-Oriented Programming in PHP frameworks and libraries.

It basically provides a layer to compile aspects in classes exposed as services in a dependency injection container.

Development
-----------

[](#development)

AOP is currently under development, so it is not recommended for production environments.

In the pipeline, we have the following ideas:

- evaluate how to integrate with the code/concepts provided in [JMSAopBundle](https://github.com/schmittjoh/JMSAopBundle)
- support static compilation of the container (for example, before deployments)
- caching
- covering the library with more and more unit tests
- writing compilers for more DICs

This library is **experimental**: we need to get our heads around the idea of AOP implemented in this way before going further with it. Development, in any case, is active.

Supported containers
--------------------

[](#supported-containers)

Here is a list of the supported DICs:

- [Symfony2](https://github.com/symfony/DependencyInjection)

Available aspects
-----------------

[](#available-aspects)

Here is a list of available aspects:

- [Loggable](https://github.com/odino/aop/blob/master/src/PUGX/AOP/Aspect/Loggable/Annotation.php)

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

[](#installation)

Installation should be done via composer.

Here's the link of the [package on Packagist](https://packagist.org/packages/pugx/aop).

Examples
--------

[](#examples)

Here is a brief recap of how to integrate AOP in your own code - you can also have a look at the scripts provided in the `examples` directory.

```
