You are here

function _authcache_enum_comb in Authenticated User Page Caching (Authcache) 7.2

Given a set of elements, return all possible subsets.

2 calls to _authcache_enum_comb()
AuthcacheEnumCombTestCase::testCombine in modules/authcache_enum/lib/Drupal/authcache_enum/Tests/AuthcacheEnumCombTestCase.php
Test calculation of combinations.
_authcache_enum_default_role_combine in modules/authcache_enum/authcache_enum.module
Default enumeration method for authcache keys.

File

modules/authcache_enum/authcache_enum.comb.inc, line 48
Private helper functions for the Authcache Enum module.

Code

function _authcache_enum_comb(array $set) {
  $result = array();
  for ($k = 1; $k <= count($set); $k++) {
    $result = array_merge($result, _authcache_enum_comb_k($set, $k));
  }
  return $result;
}