* @author Dennis Eichhorn * @copyright 2013 Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @link http://orange-management.com */ namespace phpOMS\Account; /** * Account group class. * * @category Framework * @package phpOMS\DataStorage\Database * @author OMS Development Team * @author Dennis Eichhorn * @license OMS License 1.0 * @link http://orange-management.com * @since 1.0.0 */ class Group { /** * Account id. * * @var \int * @since 1.0.0 */ protected $id = 0; /** * Account name. * * @var \string * @since 1.0.0 */ protected $name = ''; /** * Account name. * * @var \string * @since 1.0.0 */ protected $description = ''; /** * Account name. * * @var \int * @since 1.0.0 */ protected $members = []; /** * Parents . * * @var \int[] * @since 1.0.0 */ protected $parents = []; /** * Permissions. * * @var \int[] * @since 1.0.0 */ protected $permissions = []; /** * Multition cache. * * @var \Model\Account[] * @since 1.0.0 */ private static $instances = []; /** * Constructor. * * @since 1.0.0 * @author Dennis Eichhorn */ public function __construct() { } /** * Multition constructor. * * @param \int $id Account id * * @return \phpOMS\Account\Group * * @since 1.0.0 * @author Dennis Eichhorn */ public static function getInstance($id) { return self::$instances[$id] = self::$instances[$id] ?? new self(); } /** * Get account id. * * @return \int * * @since 1.0.0 * @author Dennis Eichhorn */ public function getId() { return $this->id; } /** * Get account name. * * @return \string * * @since 1.0.0 * @author Dennis Eichhorn */ public function getName() : \string { return $this->name; } /** * Get group description. * * @return \string * * @since 1.0.0 * @author Dennis Eichhorn */ public function getDescription() : \string { return $this->description; } }