code: private function filter($configurations, array $criteria)
      {
          $result = array();
  
          /**
           * @var Configuration $configuration
           */
          foreach ($configurations as $configuration) {
  
              if (ConfigurationFilterUtil::matches($configuration, $criteria)) {
                  $result[] = $configuration;
              }
          }
  
          return $result;
      }
docs: Get configurations that matches given filter criteria.
  
  @param Configuration[] $configurations Configurations to filter.
  @param array $criteria Filter criteria.
  @return Configuration[] Matched configurations.