PHPackages                             jkardynia/acl-annot - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. jkardynia/acl-annot

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

jkardynia/acl-annot
===================

Acl annotations for Zend Framewrok 2

0.0.1(12y ago)320GPLPHPPHP &gt;=5.3.3

Since Apr 5Pushed 12y ago2 watchersCompare

[ Source](https://github.com/jkardynia/acl-annotations)[ Packagist](https://packagist.org/packages/jkardynia/acl-annot)[ RSS](/packages/jkardynia-acl-annot/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

acl-annotations
===============

[](#acl-annotations)

[![Build Status](https://camo.githubusercontent.com/30b004db63616890f3c83bea7f0ec7d4b0a1e3afcbd4d5bb2bd5c2fe6cf37759/68747470733a2f2f6170692e7472617669732d63692e6f72672f6a6b617264796e69612f61636c2d616e6e6f746174696f6e732e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/jjarekk/acl-annotations)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ecf4eb179ab61c3e59a7649456e2a85e8564a2272124c1cc2ba9fd1cf343ed0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6b617264796e69612f61636c2d616e6e6f746174696f6e732f6261646765732f7175616c6974792d73636f72652e706e673f733d39366366366462363237666433333437316662353633313666626139363837376164613436393036)](https://scrutinizer-ci.com/g/jkardynia/acl-annotations/)[![Code Coverage](https://camo.githubusercontent.com/c9408b9002efe5555a77cb661b735e6e5bddf570cd923d74109307608306544a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6b617264796e69612f61636c2d616e6e6f746174696f6e732f6261646765732f636f7665726167652e706e673f733d63316665313635393461663231613334613832353666646239333336343736306464623337636233)](https://scrutinizer-ci.com/g/jkardynia/acl-annotations/)

Annotations for ACL with Zend Framework 2. This package allows you to write ACL rules just in your Zend controllers using annotations.

Installation
============

[](#installation)

You can install it via composer. Just add this to your dependencies in composer.json:

```
"jkardynia/acl-annot": "*"

```

Usage
=====

[](#usage)

Using ACL annotations is very simple. All you need to do is to use @Acl annotation to define access rule for user roles in place where you are defining your controllers.

Adding rules in controllers
---------------------------

[](#adding-rules-in-controllers)

On the snippnet below I will show you how to use ACL annotations with AlbumController - example form Zend Framework 2 tutorial [Getting Started with Zend Framework 2 - Create the controller](http://framework.zend.com/manual/2.0/en/user-guide/routing-and-controllers.html#create-the-controller)

```
