private function unserializeAcl($serialized)
    {
        $acl      = unserialize($serialized);
        $parentId = $acl->getParentAcl();

        if (null !== $parentId) {
            $parentAcl = $this->getFromCacheById($parentId);

            if (null === $parentAcl) {
                return null;
            }

            $acl->setParentAcl($parentAcl);
        }

        $reflectionProperty = new \ReflectionProperty($acl, 'permissionGrantingStrategy');

        $reflectionProperty->setAccessible(true);
        $reflectionProperty->setValue($acl, $this->permissionGrantingStrategy);
        $reflectionProperty->setAccessible(false);

        $aceAclProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'acl');

        $aceAclProperty->setAccessible(true);

        foreach ($acl->getObjectAces() as $ace) {
            $aceAclProperty->setValue($ace, $acl);
        }

        foreach ($acl->getClassAces() as $ace) {
            $aceAclProperty->setValue($ace, $acl);
        }

        $aceClassFieldProperty = new \ReflectionProperty($acl, 'classFieldAces');

        $aceClassFieldProperty->setAccessible(true);

        foreach ($aceClassFieldProperty->getValue($acl) as $aces) {
            foreach ($aces as $ace) {
                $aceAclProperty->setValue($ace, $acl);
            }
        }

        $aceClassFieldProperty->setAccessible(false);

        $aceObjectFieldProperty = new \ReflectionProperty($acl, 'objectFieldAces');

        $aceObjectFieldProperty->setAccessible(true);

        foreach ($aceObjectFieldProperty->getValue($acl) as $aces) {
            foreach ($aces as $ace) {
                $aceAclProperty->setValue($ace, $acl);
            }
        }

        $aceObjectFieldProperty->setAccessible(false);

        $aceAclProperty->setAccessible(false);

        return $acl;
    }
private function unserializeAcl($serialized)
    {
        $acl      = unserialize($serialized);
        $parentId = $acl->getParentAcl();

        if (null !== $parentId) {
            $parentAcl = $this->getFromCacheById($parentId);

            if (null === $parentAcl) {
                return null;
            }

            $acl->setParentAcl($parentAcl);
        }

        $reflectionProperty = new \ReflectionProperty($acl, 'permissionGrantingStrategy');

        $reflectionProperty->setAccessible(true);
        $reflectionProperty->setValue($acl, $this->permissionGrantingStrategy);
        $reflectionProperty->setAccessible(false);

        $aceAclProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'acl');

        $aceAclProperty->setAccessible(true);

        foreach ($acl->getObjectAces() as $ace) {
            $aceAclProperty->setValue($ace, $acl);
        }

        foreach ($acl->getClassAces() as $ace) {
            $aceAclProperty->setValue($ace, $acl);
        }

        $aceClassFieldProperty = new \ReflectionProperty($acl, 'classFieldAces');

        $aceClassFieldProperty->setAccessible(true);

        foreach ($aceClassFieldProperty->getValue($acl) as $aces) {
            foreach ($aces as $ace) {
                $aceAclProperty->setValue($ace, $acl);
            }
        }

        $aceClassFieldProperty->setAccessible(false);

        $aceObjectFieldProperty = new \ReflectionProperty($acl, 'objectFieldAces');

        $aceObjectFieldProperty->setAccessible(true);

        foreach ($aceObjectFieldProperty->getValue($acl) as $aces) {
            foreach ($aces as $ace) {
                $aceAclProperty->setValue($ace, $acl);
            }
        }

        $aceObjectFieldProperty->setAccessible(false);

        $aceAclProperty->setAccessible(false);

        return $acl;
    }
private function unserializeAcl ( $ serialized ) { $ acl = unserialize ( $ serialized ) ; $ parentId = $ acl -> getParentAcl ( ) ; if ( null !== $ parentId ) { $ parentAcl = $ this -> getFromCacheById ( $ parentId ) ; if ( null === $ parentAcl ) { return null ; } $ acl -> setParentAcl ( $ parentAcl ) ; } $ reflectionProperty = new \ ReflectionProperty ( $ acl , 'permissionGrantingStrategy' ) ; $ reflectionProperty -> setAccessible ( true ) ; $ reflectionProperty -> setValue ( $ acl , $ this -> permissionGrantingStrategy ) ; $ reflectionProperty -> setAccessible ( false ) ; $ aceAclProperty = new \ ReflectionProperty ( 'Symfony\Component\Security\Acl\Domain\Entry' , 'acl' ) ; $ aceAclProperty -> setAccessible ( true ) ; foreach ( $ acl -> getObjectAces ( ) as $ ace ) { $ aceAclProperty -> setValue ( $ ace , $ acl ) ; } foreach ( $ acl -> getClassAces ( ) as $ ace ) { $ aceAclProperty -> setValue ( $ ace , $ acl ) ; } $ aceClassFieldProperty = new \ ReflectionProperty ( $ acl , 'classFieldAces' ) ; $ aceClassFieldProperty -> setAccessible ( true ) ; foreach ( $ aceClassFieldProperty -> getValue ( $ acl ) as $ aces ) { foreach ( $ aces as $ ace ) { $ aceAclProperty -> setValue ( $ ace , $ acl ) ; } } $ aceClassFieldProperty -> setAccessible ( false ) ; $ aceObjectFieldProperty = new \ ReflectionProperty ( $ acl , 'objectFieldAces' ) ; $ aceObjectFieldProperty -> setAccessible ( true ) ; foreach ( $ aceObjectFieldProperty -> getValue ( $ acl ) as $ aces ) { foreach ( $ aces as $ ace ) { $ aceAclProperty -> setValue ( $ ace , $ acl ) ; } } $ aceObjectFieldProperty -> setAccessible ( false ) ; $ aceAclProperty -> setAccessible ( false ) ; return $ acl ; }
Unserialize a given ACL.

@param string $serialized

@return \Symfony\Component\Security\Acl\Model\AclInterface
Unserialize a given ACL .