summaryrefslogtreecommitdiffstats
path: root/Acl/Model/ObjectIdentityInterface.php
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2010-12-14 16:43:40 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2010-12-31 09:25:53 +0100
commit3bd275eddbee11dbc787eecf73c3b62fce815cbc (patch)
treee1e5727a201fb4b420a28ebb1cbec9ddd0ce1448 /Acl/Model/ObjectIdentityInterface.php
parent5853e1f130f888bfe2e5e5830ed930218cfe693b (diff)
downloadsymfony-security-3bd275eddbee11dbc787eecf73c3b62fce815cbc.zip
symfony-security-3bd275eddbee11dbc787eecf73c3b62fce815cbc.tar.gz
symfony-security-3bd275eddbee11dbc787eecf73c3b62fce815cbc.tar.bz2
added ACL system to the Security Component
Diffstat (limited to 'Acl/Model/ObjectIdentityInterface.php')
-rw-r--r--Acl/Model/ObjectIdentityInterface.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/Acl/Model/ObjectIdentityInterface.php b/Acl/Model/ObjectIdentityInterface.php
new file mode 100644
index 0000000..7f7dbc6
--- /dev/null
+++ b/Acl/Model/ObjectIdentityInterface.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace Symfony\Component\Security\Acl\Model;
+
+/*
+ * This file is part of the Symfony framework.
+ *
+ * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+/**
+ * Represents the identity of an individual domain object instance.
+ *
+ * @author Johannes M. Schmitt <schmittjoh@gmail.com>
+ */
+interface ObjectIdentityInterface
+{
+ /**
+ * We specifically require this method so we can check for object equality
+ * explicitly, and do not have to rely on referencial equality instead.
+ *
+ * Though in most cases, both checks should result in the same outcome.
+ *
+ * Referential Equality: $object1 === $object2
+ * Example for Object Equality: $object1->getId() === $object2->getId()
+ *
+ * @param ObjectIdentityInterface $identity
+ * @return Boolean
+ */
+ function equals(ObjectIdentityInterface $identity);
+
+ /**
+ * Obtains a unique identifier for this object. The identifier must not be
+ * re-used for other objects with the same type.
+ *
+ * @return string cannot return null
+ */
+ function getIdentifier();
+
+ /**
+ * Returns a type for the domain object. Typically, this is the PHP class name.
+ *
+ * @return string cannot return null
+ */
+ function getType();
+} \ No newline at end of file