2017 © Pedro Peláez
 

library pecl-aop-interceptor

PHP code interceptor for PHP-AOP, based on AOP PHP extension (pecl aop-beta). Provides an abstraction layer of the PHP extension 'PECL AOP', with many features to go further in the handling of the AOP with PHP.

image

aop-io/pecl-aop-interceptor

PHP code interceptor for PHP-AOP, based on AOP PHP extension (pecl aop-beta). Provides an abstraction layer of the PHP extension 'PECL AOP', with many features to go further in the handling of the AOP with PHP.

  • Thursday, August 14, 2014
  • by Nicolab
  • Repository
  • 2 Watchers
  • 2 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PECL AOP interceptor

Interceptor using PECL AOP extension for PHP AOP.io lib (php-aop)., (*1)

Provides an abstraction layer of 'PECL AOP extension', with many features to go further in the handling of the AOP with PHP. Beyond the possibilities of the PECL extension., (*2)

This package is an adapter for PHP AOP.io lib (an abstraction layer easy to use). The doc below assumes that you have already installed the PHP AOP.io lib., (*3)

Getting Started

Install PECL AOP

You can use pecl, (*4)

    sudo pecl install aop-beta

or, (*5)

Download the AOP PHP extension from github, compile and add the extension to your php.ini, (*6)

    #Clone the repository on your computer
    git clone https://github.com/AOP-PHP/AOP
    cd AOP
    #prepare the package, you will need to have development tools for php
    phpize
    #compile the package
    ./configure
    make
    #before the installation, check that it works properly
    make test
    #install
    make install

Now you can add the following line to your php.ini to enables AOP extension, (*7)

    extension=AOP.so

More doc on PECL AOP repository., (*8)

Install pecl-aop-interceptor

Download pecl-aop-interceptor (and configure your autoloader) or use composer require: "aop-io/pecl-aop-interceptor"., (*9)

Usage

use Aop\Aop;

// Init
$aop = new Aop([ 'php_interceptor' => '\PeclAop\PeclAopInterceptor']);

The PECL AOP extension support the wilcard selector, example:, (*10)

Aop::addBefore('MyClass::get*()', function($jp) {
  // your hack here
});

The syntax of pointcuts selectors of PECL AOP extension is documented on the page PECL AOP (pointcuts syntax)., (*11)

The usage of the AOP abstraction layer is documented on AOP.io., (*12)

License

MIT (c) 2013, Nicolas Tallefourtane., (*13)

Author

Nicolas Tallefourtane - Nicolab.net
Nicolas Talle
Make a donation via Paypal

The Versions

14/08 2014

dev-master

9999999-dev http://aop.io

PHP code interceptor for PHP-AOP, based on AOP PHP extension (pecl aop-beta). Provides an abstraction layer of the PHP extension 'PECL AOP', with many features to go further in the handling of the AOP with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

pecl lib aop aop-io-interceptor patch monkey aop-php

14/08 2014

v0.1

0.1.0.0 http://aop.io

PHP code interceptor for PHP-AOP, based on AOP PHP extension (pecl aop-beta). Provides an abstraction layer of the PHP extension 'PECL AOP', with many features to go further in the handling of the AOP with PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

pecl lib aop aop-io-interceptor patch monkey aop-php