| @@ -1,40 +1,100 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * AssignmentInformation.php | |
| 4 | + * | |
| 5 | + * The AssignmentInformation class file. | |
| 6 | + * | |
| 7 | + * PHP versions 5 | |
| 8 | + * | |
| 9 | + * @author Alexander Schneider <alexanderschneider85@gmail.com> | |
| 10 | + * @copyright 2008-2017 Alexander Schneider | |
| 11 | + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 | |
| 12 | + * @version SVN: $id$ | |
| 13 | + * @link http://wordpress.org/extend/plugins/user-access-manager/ | |
| 14 | + */ | |
| 2 | 15 | |
| 3 | 16 | declare(strict_types=1); |
| 4 | 17 | |
| 5 | 18 | namespace UserAccessManager\UserGroup; |
| 6 | 19 | |
| 20 | +/** | |
| 21 | + * Class AssignmentInformation | |
| 22 | + * | |
| 23 | + * @package UserAccessManager\UserGroup | |
| 24 | + */ | |
| 7 | 25 | class AssignmentInformation |
| 8 | 26 | { |
| 9 | - public function __construct( | |
| 10 | - private ?string $type = null, | |
| 11 | - private ?string $fromDate = null, | |
| 12 | - private ?string $toDate = null, | |
| 13 | - private array $recursiveMembership = [] | |
| 14 | - ) { | |
| 27 | + /** | |
| 28 | + * @var string | |
| 29 | + */ | |
| 30 | + private $type; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * @var null|string | |
| 34 | + */ | |
| 35 | + private $fromDate; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * @var null|string | |
| 39 | + */ | |
| 40 | + private $toDate; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * @var array | |
| 44 | + */ | |
| 45 | + private $recursiveMembership; | |
| 46 | + | |
| 47 | + /** | |
| 48 | + * AssignmentInformation constructor. | |
| 49 | + * @param string $type | |
| 50 | + * @param string $fromDate | |
| 51 | + * @param string $toDate | |
| 52 | + * @param array $recursiveMembership | |
| 53 | + */ | |
| 54 | + public function __construct($type = null, $fromDate = null, $toDate = null, array $recursiveMembership = []) | |
| 55 | + { | |
| 56 | + $this->type = $type; | |
| 57 | + $this->fromDate = $fromDate; | |
| 58 | + $this->toDate = $toDate; | |
| 59 | + $this->recursiveMembership = $recursiveMembership; | |
| 15 | 60 | } |
| 16 | 61 | |
| 62 | + /** | |
| 63 | + * @return string | |
| 64 | + */ | |
| 17 | 65 | public function getType(): ?string |
| 18 | 66 | { |
| 19 | 67 | return $this->type; |
| 20 | 68 | } |
| 21 | 69 | |
| 70 | + /** | |
| 71 | + * @return null|string | |
| 72 | + */ | |
| 22 | 73 | public function getFromDate(): ?string |
| 23 | 74 | { |
| 24 | 75 | return $this->fromDate; |
| 25 | 76 | } |
| 26 | 77 | |
| 78 | + /** | |
| 79 | + * @return null|string | |
| 80 | + */ | |
| 27 | 81 | public function getToDate(): ?string |
| 28 | 82 | { |
| 29 | 83 | return $this->toDate; |
| 30 | 84 | } |
| 31 | 85 | |
| 32 | - public function setRecursiveMembership(array $recursiveMembership): void | |
| 86 | + /** | |
| 87 | + * @param array $recursiveMembership | |
| 88 | + */ | |
| 89 | + public function setRecursiveMembership(array $recursiveMembership) | |
| 33 | 90 | { |
| 34 | 91 | $this->recursiveMembership = $recursiveMembership; |
| 35 | 92 | } |
| 36 | 93 | |
| 94 | + /** | |
| 95 | + * @return array | |
| 96 | + */ | |
| 37 | 97 | public function getRecursiveMembership(): array |
| 38 | 98 | { |
| 39 | 99 | return $this->recursiveMembership; |
| 40 | 100 | } |