PHPackages                             zonuexe/simple-annotations - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. zonuexe/simple-annotations

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

zonuexe/simple-annotations
==========================

Simple annotation parser

0.3.1(9y ago)195MITPHPPHP &gt;= 5.4.0

Since Apr 13Pushed 9y ago1 watchersCompare

[ Source](https://github.com/zonuexe/php-simple-annotations)[ Packagist](https://packagist.org/packages/zonuexe/simple-annotations)[ Docs](https://github.com/zonuexe/php-simple-annotations)[ RSS](/packages/zonuexe-simple-annotations/feed)WikiDiscussions master Synced 1mo ago

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

PHP Simple Annotations
======================

[](#php-simple-annotations)

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

[](#installation)

Get [composer](http://getcomposer.org/) and learn to use it.

Library is on [packagist](https://packagist.org/packages/jan-swiecki/simple-annotations).

If you refuse to use composer then instead of `include_once "vendor/autoload.php"` use `include_once "src/DocBlockReader/Reader.php"`.

Test
----

[](#test)

You need [PHPUnit](https://github.com/sebastianbergmann/phpunit/). After you get it run:

```
> git clone https://github.com/jan-swiecki/php-simple-annotations
> cd php-simple-annotations
> composer install
> phpunit

```

API
---

[](#api)

- `$reader = new \DocBlockReader\Reader(String $className)`

Initialize DocBlock Reader on class `$className`

- `$reader = new \DocBlockReader\Reader(String $className, String $methodName)`

Initialize DocBlock Reader on method `$className::$methodName`

- `$reader->getParameter(String $key)`

Returns DocBlock value of parameter `$key`. E.g.

```
