Generic.php
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * ====================================================================== |
| 5 | * LICENSE: This file is subject to the terms and conditions defined in * |
| 6 | * file 'license.txt', which is part of this source code package. * |
| 7 | * ====================================================================== |
| 8 | */ |
| 9 | |
| 10 | /** |
| 11 | * Generic resource class |
| 12 | * |
| 13 | * @package AAM |
| 14 | * @version 7.0.0 |
| 15 | */ |
| 16 | class AAM_Framework_Resource_Generic implements AAM_Framework_Resource_Interface |
| 17 | { |
| 18 | |
| 19 | use AAM_Framework_Resource_BaseTrait; |
| 20 | |
| 21 | /** |
| 22 | * @inheritDoc |
| 23 | */ |
| 24 | protected $type = ''; |
| 25 | |
| 26 | /** |
| 27 | * Constructor |
| 28 | * |
| 29 | * Initialize the resource container |
| 30 | * |
| 31 | * @param AAM_Framework_AccessLevel_Interface $access_level |
| 32 | * @param string $resource_type |
| 33 | * |
| 34 | * @return void |
| 35 | * @access public |
| 36 | * |
| 37 | * @version 7.0.0 |
| 38 | */ |
| 39 | public function __construct($access_level, $resource_type) |
| 40 | { |
| 41 | $this->_access_level = $access_level; |
| 42 | $this->type = $resource_type; |
| 43 | |
| 44 | // Do not allow extending generic resource |
| 45 | |
| 46 | // Initialize permissions |
| 47 | $this->_init_permissions(); |
| 48 | } |
| 49 | |
| 50 | } |