marcioAlmada/annotations — pull request #5 by nyamsprod (2013-10-03 14:24:21+00:00)
Title: Updated the AnnotationsBag.php

* Made the Class more PSR-2 compliant
* Use Type hinting on the constructor method to force the use of an Array
* Added 2 new methods setDelimeter and getDelimeter to make use of preg_quote on the regex string given to the grep method. By default and to be compatible with the old code the default delimeter is `/`

```php
setDelimeter('@');
$bar->getDelimeter() //should give you '@'
$bar->grep('toto/tata'); //should then work
$nb = count($bag); //the total number of attributes;
```

* refactored `getAsArray` to simply transform into an array the result of the `get` method. When a null value is encountered an empty array will be return so `getAsArray` will always return a array as expected.
On a side note, I just don't get the added value of this method perhaps a concrete example will help me understand it.

* I've made the AnnotationBag countable... also now you can do something like:

```php