summaryrefslogtreecommitdiffstats
path: root/Acl/Permission/AbstractMaskBuilder.php
diff options
context:
space:
mode:
authorIltar van der Berg <ivanderberg@hostnet.nl>2015-06-17 09:11:27 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-08-01 09:17:24 +0200
commitfc68db0b1c78e0ae166f00b2dc7ac5893cd883bf (patch)
tree66f70adc6bb6964def20e7a38f27d115f84e1895 /Acl/Permission/AbstractMaskBuilder.php
parentbb80188e3b42a85f6c4ead17332098cab3f62aac (diff)
downloadsymfony-security-fc68db0b1c78e0ae166f00b2dc7ac5893cd883bf.zip
symfony-security-fc68db0b1c78e0ae166f00b2dc7ac5893cd883bf.tar.gz
symfony-security-fc68db0b1c78e0ae166f00b2dc7ac5893cd883bf.tar.bz2
[Security] Removed security-acl from the core
Diffstat (limited to 'Acl/Permission/AbstractMaskBuilder.php')
-rw-r--r--Acl/Permission/AbstractMaskBuilder.php85
1 files changed, 0 insertions, 85 deletions
diff --git a/Acl/Permission/AbstractMaskBuilder.php b/Acl/Permission/AbstractMaskBuilder.php
deleted file mode 100644
index 867d2e2..0000000
--- a/Acl/Permission/AbstractMaskBuilder.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Security\Acl\Permission;
-
-/**
- * This abstract class implements nearly all the MaskBuilderInterface methods
- */
-abstract class AbstractMaskBuilder implements MaskBuilderInterface
-{
- /**
- * @var int
- */
- protected $mask;
-
- /**
- * Constructor.
- *
- * @param int $mask optional; defaults to 0
- */
- public function __construct($mask = 0)
- {
- $this->set($mask);
- }
-
- /**
- * {@inheritdoc}
- */
- public function set($mask)
- {
- if (!is_int($mask)) {
- throw new \InvalidArgumentException('$mask must be an integer.');
- }
-
- $this->mask = $mask;
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function get()
- {
- return $this->mask;
- }
-
- /**
- * {@inheritdoc}
- */
- public function add($mask)
- {
- $this->mask |= $this->resolveMask($mask);
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function remove($mask)
- {
- $this->mask &= ~$this->resolveMask($mask);
-
- return $this;
- }
-
- /**
- * {@inheritdoc}
- */
- public function reset()
- {
- $this->mask = 0;
-
- return $this;
- }
-}