Overview

Namespaces

  • PHP
  • ProgrammingAreHard
    • Arbiter
      • Domain
      • Model
  • Symfony
    • Component
      • Security
        • Acl
          • Exception
          • Model
          • Permission
        • Core
          • User

Classes

  • IdentityFactory
  • IndexedAce
  • ObjectArbiter
  • PermissionMap
  • Permissions
  • PermissionsFactory
  • PermissionsTransformer
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace ProgrammingAreHard\Arbiter\Domain;
 4: 
 5: use ProgrammingAreHard\Arbiter\Model\IdentityFactoryInterface;
 6: use Symfony\Component\Security\Acl\Domain\ObjectIdentity;
 7: use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
 8: use Symfony\Component\Security\Core\User\UserInterface;
 9: 
10: class IdentityFactory implements IdentityFactoryInterface
11: {
12:     /**
13:      * {@inheritdoc}
14:      */
15:     public function getObjectIdentity($object)
16:     {
17:         return ObjectIdentity::fromDomainObject($object);
18:     }
19: 
20:     /**
21:      * {@inheritdoc}
22:      */
23:     public function getUserIdentity(UserInterface $user)
24:     {
25:         return UserSecurityIdentity::fromAccount($user);
26:     }
27: } 
Arbiter API documentation generated by ApiGen 2.8.0