/** * Returns an instance of class * * @return MEMBERSHIP_BOL_MembershipTypeDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function deleteUserMembershipsByRoleId($roleId) { $types = $this->membershipTypeDao->getTypeIdListByRoleId($roleId); if ($types) { foreach ($types as $typeId) { $this->membershipUserDao->deleteByTypeId($typeId); } } return true; }