Skip to content

2.3.0

Compare
Choose a tag to compare
@koriym koriym released this 17 Feb 10:04
· 1157 commits to 2.x since this release

This release provides better annotation reading. It makes easy and performance boost.

An alternate package reflection have get-annotation method. #60

/** @var $method \Ray\Aop\ReflectionMethod */
$method = $invocation->getMethod();
/** @var $class \Ray\Aop\ReflectionClass */
$class = $invocation->getMethod()->getDeclaringClass();

You don't need doctrine annotation reader in your interceptor for annotation.

behind scene:

Annotations are serialized and attached to generated intercepting class as caching data. It makes generated code and cached annotation synchronized sure. A code is generated on original file timestamp base.

class Ray_Aop_FakeAnnotateClass_OWAJSAU extends Ray\Aop\FakeAnnotateClass implements Ray\Aop\WeavedInterface
{
    private $isIntercepting = true;
    public $bind;
    public $methodAnnotations = 'a:1:{s:9:"getDouble";a:3:{s:19:"Ray\\Aop\\FakeMarker3";O:19:"Ray\\Aop\\FakeMarker3":0:{}s:19:"Ray\\Aop\\FakeMarker2";O:19:"Ray\\Aop\\FakeMarker2":0:{}s:18:"Ray\\Aop\\FakeMarker";O:18:"Ray\\Aop\\FakeMarker":0:{}}}';
    public $classAnnotations = 'a:2:{s:20:"Ray\\Aop\\FakeResource";O:20:"Ray\\Aop\\FakeResource":0:{}s:27:"Ray\\Aop\\FakeClassAnnotation";O:27:"Ray\\Aop\\FakeClassAnnotation":1:{s:5:"value";s:4:"item";}}';
}

It is fast.