vendor/bundles/JMS/SecurityExtraBundle/Tests/Mapping/Driver/Fixtures/services.php
author ymh <ymh.work@gmail.com>
Sun, 06 Nov 2011 23:44:37 +0100
changeset 27 1df556b2c0f9
parent 0 7f95f8617b0b
permissions -rwxr-xr-x
Correct memory problem

<?php

namespace JMS\SecurityExtraBundle\Tests\Mapping\Driver;

use JMS\SecurityExtraBundle\Annotation\SecureReturn;
use JMS\SecurityExtraBundle\Annotation\SecureParam;
use JMS\SecurityExtraBundle\Annotation\Secure;

class FooService implements FooInterface
{
    /**
     * @Secure(roles="ROLE_USER, ROLE_ADMIN, ROLE_SUPERADMIN")
     * @SecureParam(name="param", permissions="VIEW")
     */
    public function foo($param, $anotherParam) { }

    /**
     * @Secure("ROLE_FOO, ROLE_BAR")
     */
    public function shortNotation() { }
}
interface FooInterface
{
    /**
     * @SecureParam(name="param", permissions="OWNER")
     * @SecureParam(name="anotherParam", permissions="EDIT")
     * @SecureReturn(permissions="MASTER")
     */
    function foo($param, $anotherParam);
}