summaryrefslogtreecommitdiffstats
path: root/Acl/Domain/ObjectIdentity.php
diff options
context:
space:
mode:
Diffstat (limited to 'Acl/Domain/ObjectIdentity.php')
-rw-r--r--Acl/Domain/ObjectIdentity.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Acl/Domain/ObjectIdentity.php b/Acl/Domain/ObjectIdentity.php
index 927a1b8..da98f5e 100644
--- a/Acl/Domain/ObjectIdentity.php
+++ b/Acl/Domain/ObjectIdentity.php
@@ -11,6 +11,7 @@
namespace Symfony\Component\Security\Acl\Domain;
+use Symfony\Component\Security\Core\Util\ClassUtils;
use Symfony\Component\Security\Acl\Exception\InvalidDomainObjectException;
use Symfony\Component\Security\Acl\Model\DomainObjectInterface;
use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface;
@@ -30,7 +31,6 @@ final class ObjectIdentity implements ObjectIdentityInterface
*
* @param string $identifier
* @param string $type
- * @return void
*/
public function __construct($identifier, $type)
{
@@ -60,9 +60,9 @@ final class ObjectIdentity implements ObjectIdentityInterface
try {
if ($domainObject instanceof DomainObjectInterface) {
- return new self($domainObject->getObjectIdentifier(), get_class($domainObject));
+ return new self($domainObject->getObjectIdentifier(), ClassUtils::getRealClass($domainObject));
} elseif (method_exists($domainObject, 'getId')) {
- return new self($domainObject->getId(), get_class($domainObject));
+ return new self($domainObject->getId(), ClassUtils::getRealClass($domainObject));
}
} catch (\InvalidArgumentException $invalid) {
throw new InvalidDomainObjectException($invalid->getMessage(), 0, $invalid);