summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Rabaix <thomas.rabaix@ekino.com>2011-05-24 18:25:28 +0200
committerThomas Rabaix <thomas.rabaix@ekino.com>2011-05-24 18:25:28 +0200
commite6251f551be7100fc327a38f122a3980275c6225 (patch)
treeea765715afc755766c465a3fbac19380e4f01a59
parent6b3a0ace240ef45f1a74792ca289d98241e4778f (diff)
downloadsymfony-security-e6251f551be7100fc327a38f122a3980275c6225.zip
symfony-security-e6251f551be7100fc327a38f122a3980275c6225.tar.gz
symfony-security-e6251f551be7100fc327a38f122a3980275c6225.tar.bz2
change self to static so the parent class can have access to the child constant
-rw-r--r--Acl/Permission/MaskBuilder.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Acl/Permission/MaskBuilder.php b/Acl/Permission/MaskBuilder.php
index 9965228..a0c84f8 100644
--- a/Acl/Permission/MaskBuilder.php
+++ b/Acl/Permission/MaskBuilder.php
@@ -92,7 +92,7 @@ class MaskBuilder
*/
public function add($mask)
{
- if (is_string($mask) && defined($name = 'self::MASK_'.strtoupper($mask))) {
+ if (is_string($mask) && defined($name = 'static::MASK_'.strtoupper($mask))) {
$mask = constant($name);
} else if (!is_int($mask)) {
throw new \InvalidArgumentException('$mask must be an integer.');
@@ -145,7 +145,7 @@ class MaskBuilder
*/
public function remove($mask)
{
- if (is_string($mask) && defined($name = 'self::MASK_'.strtoupper($mask))) {
+ if (is_string($mask) && defined($name = 'static::MASK_'.strtoupper($mask))) {
$mask = constant($name);
} else if (!is_int($mask)) {
throw new \InvalidArgumentException('$mask must be an integer.');
@@ -189,7 +189,7 @@ class MaskBuilder
}
if ($mask === $cMask) {
- if (!defined($cName = 'self::CODE_'.substr($name, 5))) {
+ if (!defined($cName = 'static::CODE_'.substr($name, 5))) {
throw new \RuntimeException('There was no code defined for this mask.');
}